/* ============================================================
   KC 订阅开通台 — 前台样式
   视觉概念：充值券 / 柜台小票。纸质底纹、墨色细线、穿孔副券。
   仅由 index.html 引用；subscription.html 仍使用 style.css。
   ============================================================ */

:root {
    --paper: #EDF0E7;
    --sheet: #FCFCF6;
    --ink: #17231D;
    --ink-soft: #4F6057;
    --ink-faint: #56655C;
    --pine: #0F5B47;
    --pine-deep: #0A4133;
    --pine-wash: #E1EBE3;
    --stamp: #AE3A2A;
    --stamp-wash: #F6E7E3;
    --rule: #C6CEBF;
    --rule-soft: #DFE4D8;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
        "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.recharge-page {
    display: block;
    min-height: 100vh;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    background-image: radial-gradient(rgba(23, 35, 29, 0.055) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--pine);
    color: var(--sheet);
}

.page-shell {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
    padding: 26px 0 72px;
}

/* ---------------- 页眉 ---------------- */

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ink);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.wordmark-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 29px;
    background: var(--pine);
    color: var(--sheet);
    border-radius: 2px;
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.wordmark-text {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.pause-stamp {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border: 1.5px solid var(--stamp);
    outline: 1px solid rgba(174, 58, 42, 0.32);
    outline-offset: 2px;
    border-radius: 2px;
    color: var(--stamp);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    transform: rotate(-2.5deg);
    opacity: 0.92;
    white-space: nowrap;
}

/* ---------------- 主标题 ---------------- */

.hero {
    padding: 54px 0 0;
}

.hero h1 {
    font-size: clamp(36px, 5.6vw, 58px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.025em;
}

.hero-lede {
    max-width: 40em;
    margin-top: 20px;
    color: var(--ink-soft);
    font-size: 15.5px;
    line-height: 1.8;
}

.hero-actions {
    margin-top: 30px;
}

.invoice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 28px;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 2px;
    color: var(--sheet);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.invoice-btn:hover {
    background: #2C3B33;
    border-color: #2C3B33;
    color: var(--sheet);
}

.invoice-btn:active {
    transform: translateY(1px);
}

/* ---------------- 套餐价目 ---------------- */

.plan-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 46px;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.plan-card {
    padding: 20px 24px 24px;
    border-left: 1px solid var(--rule-soft);
}

.plan-card:first-child {
    border-left: none;
    padding-left: 0;
}

.plan-card:last-child {
    padding-right: 0;
}

.plan-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.plan-card h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.plan-card p {
    color: var(--ink-soft);
    font-size: 13.5px;
    line-height: 1.7;
}

.plan-card strong {
    color: var(--ink);
    font-weight: 600;
}

.plan-tag {
    flex-shrink: 0;
    padding: 1px 7px;
    border: 1px solid var(--rule);
    border-radius: 1px;
    color: var(--ink-faint);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.plan-tag.pro {
    border-color: rgba(15, 91, 71, 0.45);
    color: var(--pine);
}

.plan-card.highlight h3 {
    color: var(--pine);
}

.region-hint {
    margin-top: 10px;
    color: var(--ink-faint);
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.02em;
    text-align: right;
}

/* ---------------- 小票主体 ---------------- */

.ticket {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 306px;
    margin-top: 34px;
    background: var(--sheet);
    border: 1px solid var(--ink);
    border-radius: 3px;
    box-shadow: 8px 8px 0 rgba(23, 35, 29, 0.07);
    position: relative;
}

.ticket-main {
    padding: 30px 32px 32px;
    min-width: 0;
}

.card-head h2 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-head p {
    margin-top: 3px;
    color: var(--ink-soft);
    font-size: 13px;
}

/* 提示条：细边 + 墨色 */
.notice-banner {
    margin: 20px 0 22px;
    padding: 9px 0 9px 14px;
    border-left: 3px solid var(--pine);
}

.notice-banner p {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.65;
}

/* 标签页：下划线式 */
.tab-nav {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 22px;
}

.tab-btn {
    position: relative;
    width: auto;
    flex: 0 0 auto;
    padding: 0 0 10px;
    margin-bottom: -1px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--ink-faint);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
    color: var(--ink);
    background: none;
}

.tab-btn.active {
    color: var(--ink);
    border-bottom-color: var(--pine);
}

.tab-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---------------- 表单 ---------------- */

.field-label {
    display: block;
    margin-bottom: 9px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

input,
textarea {
    display: block;
    width: 100%;
    padding: 0 14px;
    height: 50px;
    background: #FFFFFF;
    border: 1px solid var(--rule);
    border-radius: 2px;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder,
textarea::placeholder {
    color: #8A988F;
}

input:hover,
textarea:hover {
    border-color: #A8B3A4;
}

input:focus,
textarea:focus {
    border-color: var(--pine);
    box-shadow: 0 0 0 3px rgba(15, 91, 71, 0.13);
}

#cdkInput,
#queryInput {
    height: 60px;
    padding: 0 16px;
    font-family: var(--mono);
    font-size: 18px;
    letter-spacing: 0.1em;
}

#tokenInput,
#sessionInput {
    height: auto;
    min-height: 148px;
    padding: 12px 14px 46px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.65;
    resize: vertical;
}

textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-thumb {
    background: var(--rule);
    border-radius: 0;
}

.textarea-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

.get-token-btn-floating {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    background: var(--pine-wash);
    border: 1px solid #B9CCBB;
    border-radius: 2px;
    color: var(--pine-deep) !important;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.get-token-btn-floating:hover {
    background: var(--pine);
    border-color: var(--pine);
    color: var(--sheet) !important;
}

/* ---------------- 按钮 ---------------- */

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    background: var(--pine);
    border: 1px solid var(--pine);
    border-radius: 2px;
    color: var(--sheet);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button:hover:not(:disabled) {
    background: var(--pine-deep);
    border-color: var(--pine-deep);
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.btn-secondary {
    height: 44px;
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink-soft);
}

.btn-secondary:hover:not(:disabled) {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
}

.btn-lg {
    height: 52px;
    font-size: 14.5px;
}

.loader {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(252, 252, 246, 0.35);
    border-top-color: var(--sheet);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex: 0 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

button.is-loading .btn-text {
    opacity: 0.85;
}

/* ---------------- 已确认信息 ---------------- */

.cdk-confirmed,
.plan-confirmed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--rule);
    color: var(--ink-soft);
    font-size: 13px;
}

.cdk-confirmed code {
    padding: 2px 8px;
    background: var(--pine-wash);
    border-radius: 2px;
    color: var(--pine-deep);
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.05em;
}

.plan-confirmed strong {
    color: var(--ink);
    font-weight: 600;
}

.field-hint {
    margin-top: 0;
    color: var(--ink-faint);
    font-size: 12px;
    line-height: 1.6;
}

/* ---------------- 进度 ---------------- */

.task-progress {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--rule);
}

.task-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--ink-soft);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.task-progress-header b {
    color: var(--pine);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
}

.task-progress-track {
    height: 6px;
    background: var(--rule-soft);
    border-radius: 0;
    overflow: hidden;
}

.task-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--pine);
    border-radius: 0;
    transition: width 0.4s ease;
}

.task-progress-bar.error {
    background: var(--stamp);
}

.task-progress-text {
    margin-top: 8px;
    color: var(--ink-faint);
    font-size: 11.5px;
    line-height: 1.55;
}

/* ---------------- 状态消息 ---------------- */

.status-message {
    display: none;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 2px;
    font-size: 13.5px;
    line-height: 1.65;
    text-align: left;
}

.status-success {
    background: #EBF2EB;
    border-color: #B9CCBB;
    color: #1C4A34;
}

.status-error {
    background: var(--stamp-wash);
    border-color: #DFB7AE;
    color: #8A2E21;
}

.status-message .query-result-card {
    margin-top: 6px;
}

.query-result-card {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

.query-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(23, 35, 29, 0.12);
    font-size: 13px;
}

.query-row:last-child {
    border-bottom: none;
}

.query-row span {
    color: var(--ink-soft);
}

.query-row strong {
    color: var(--ink);
    font-weight: 600;
    font-family: var(--mono);
    font-size: 12.5px;
    text-align: right;
    word-break: break-all;
}

.status-unused {
    color: var(--pine) !important;
}

.status-used {
    color: var(--stamp) !important;
}

.status-processing {
    color: #9A6B12 !important;
}

/* ---------------- 副券 ---------------- */

.ticket-stub {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 26px 22px 24px;
    border-left: 1px dashed #A9B4A4;
    background: rgba(15, 91, 71, 0.028);
    border-radius: 0 2px 2px 0;
}

.ticket-stub::before,
.ticket-stub::after {
    content: "";
    position: absolute;
    left: -8px;
    width: 14px;
    height: 14px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
}

.ticket-stub::before {
    top: -8px;
}

.ticket-stub::after {
    bottom: -8px;
}

.stub-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stub-label {
    color: var(--ink-faint);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.flow-badge {
    padding: 3px 8px;
    border: 1px solid var(--rule);
    border-radius: 1px;
    color: var(--ink-faint);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.flow-badge.pending {
    border-color: var(--rule);
    color: var(--ink-faint);
}

.flow-badge.cdk_ok {
    background: var(--pine-wash);
    border-color: #B9CCBB;
    color: var(--pine-deep);
}

.flow-badge.running {
    background: var(--pine);
    border-color: var(--pine);
    color: var(--sheet);
}

.flow-badge.success {
    background: #DDEBDF;
    border-color: #9DBDA4;
    color: #1C4A34;
}

.flow-badge.failed,
.flow-badge.manual {
    background: var(--stamp-wash);
    border-color: #DFB7AE;
    color: #8A2E21;
}

/* 竖向步骤 */
.stepper {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-faint);
    font-size: 12.5px;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--ink-faint);
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-item.active .step-num {
    background: var(--pine);
    border-color: var(--pine);
    color: var(--sheet);
}

.step-item.done .step-num {
    border-color: var(--pine);
    color: var(--pine);
    font-size: 0;
}

.step-item.done .step-num::after {
    content: "\2713";
    font-size: 11px;
}

.step-item.active,
.step-item.done {
    color: var(--ink);
}

.step-line {
    width: 1px;
    height: 14px;
    margin: 2px 0 2px 11px;
    background: repeating-linear-gradient(to bottom, var(--rule) 0 3px, transparent 3px 6px);
    flex: none;
}

/* 并发面板 */
#publicRuntimeCard {
    position: static;
    width: 100%;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
    background: none;
    box-shadow: none;
    transform: none;
}

.public-runtime-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

.public-runtime-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-faint);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.public-runtime-title::before {
    content: "";
    width: 5px;
    height: 5px;
    background: var(--pine);
}

.public-runtime-value {
    color: var(--ink);
    font-family: var(--mono);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.public-runtime-meta {
    color: var(--ink-faint);
    font-size: 11.5px;
}

.public-slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    margin-top: 8px;
}

.public-slot-box {
    width: 16px;
    height: 8px;
    background: var(--rule-soft);
    border: none;
    border-radius: 1px;
    transition: background 0.2s ease;
}

.public-slot-box.occupied {
    background: var(--pine);
}

.public-runtime-panel.load-low .public-runtime-value {
    color: var(--pine);
}

.public-runtime-panel.load-mid .public-runtime-value {
    color: #9A6B12;
}

.public-runtime-panel.load-mid .public-slot-box.occupied {
    background: #B98A1F;
}

.public-runtime-panel.load-high .public-runtime-value {
    color: var(--stamp);
}

.public-runtime-panel.load-high .public-slot-box.occupied {
    background: var(--stamp);
}

.stub-note {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--rule);
    color: var(--ink-faint);
    font-size: 11.5px;
    line-height: 1.65;
}

/* ---------------- 常见问题 ---------------- */

.faq-panel {
    margin-top: 34px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.faq-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    list-style: none;
    cursor: pointer;
}

.faq-panel summary::-webkit-details-marker {
    display: none;
}

.faq-panel summary::after {
    content: "+";
    color: var(--ink-faint);
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 400;
}

.faq-panel[open] summary::after {
    content: "\2212";
}

.faq-panel ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0 0 20px;
    list-style: none;
}

.faq-panel li {
    position: relative;
    padding-left: 16px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.75;
}

.faq-panel li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 4px;
    height: 4px;
    background: var(--pine);
}

/* ---------------- 发票助手 ---------------- */

.masthead-link {
    color: var(--ink-soft);
    font-size: 12.5px;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1px;
    white-space: nowrap;
}

.masthead-link:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.hero-compact {
    padding-top: 44px;
}

.subscription-field-hint {
    margin-top: 10px;
}

.subscription-query-actions {
    margin-top: 16px;
}

.subscription-result {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--ink);
}

.subscription-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.subscription-result-head h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.subscription-result .query-result-card {
    border-top: 1px solid var(--rule-soft);
}

.subscription-result .query-row {
    padding: 9px 0;
}

.subscription-result .query-row span {
    white-space: nowrap;
}

.subscription-actions {
    margin-top: 18px;
}

.action-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    padding: 0 20px;
    background: var(--pine);
    border: 1px solid var(--pine);
    border-radius: 2px;
    color: var(--sheet);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.action-link-btn:hover {
    background: var(--pine-deep);
    border-color: var(--pine-deep);
    color: var(--sheet);
}

.stub-facts {
    margin-top: 16px;
    border-top: 1px solid var(--rule);
}

.stub-facts > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--rule);
}

.stub-facts dt {
    flex-shrink: 0;
    color: var(--ink-faint);
    font-size: 11.5px;
}

.stub-facts dd {
    color: var(--ink-soft);
    font-size: 11.5px;
    line-height: 1.6;
    text-align: right;
}

.guide-panel {
    margin-top: 34px;
    border-top: 1px solid var(--ink);
}

.guide-panel + .faq-panel {
    margin-top: 0;
}

.guide-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    list-style: none;
    cursor: pointer;
}

.guide-panel summary::-webkit-details-marker {
    display: none;
}

.guide-panel summary::after {
    content: "+";
    color: var(--ink-faint);
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 400;
}

.guide-panel[open] summary::after {
    content: "\2212";
}

.guide-steps {
    margin: 0;
    padding: 0 0 20px;
    list-style: none;
}

.guide-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 15px 0;
    border-top: 1px dashed var(--rule-soft);
}

.guide-step:first-child {
    padding-top: 4px;
    border-top: none;
}

.guide-step-num {
    padding-top: 3px;
    color: var(--pine);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.04em;
}

.guide-step h3 {
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 600;
}

.guide-step p {
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.7;
}

.guide-step a {
    color: var(--pine);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.guide-step strong {
    color: var(--ink);
    font-weight: 600;
}

/* ---------------- 可访问性 ---------------- */

:where(button, a, input, textarea, summary):focus-visible {
    outline: 2px solid var(--pine);
    outline-offset: 2px;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 940px) {
    .ticket {
        grid-template-columns: 1fr;
        box-shadow: 5px 5px 0 rgba(23, 35, 29, 0.07);
    }

    .ticket-stub {
        border-left: none;
        border-top: 1px dashed #A9B4A4;
        border-radius: 0 0 2px 2px;
        padding: 22px 24px 24px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 28px;
        align-items: start;
    }

    .ticket-stub::before,
    .ticket-stub::after {
        display: none;
    }

    .stub-status,
    .stepper {
        grid-column: 1;
    }

    #publicRuntimeCard {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .stub-note {
        grid-column: 1 / -1;
    }

    #taskProgress {
        grid-column: 1;
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: calc(100% - 32px);
        padding: 18px 0 48px;
    }

    .hero {
        padding-top: 38px;
    }

    .hero h1 {
        font-size: clamp(32px, 9vw, 44px);
    }

    .hero-lede {
        font-size: 14.5px;
    }

    .hero-actions {
        margin-top: 24px;
    }

    .plan-board {
        grid-template-columns: 1fr;
        margin-top: 34px;
    }

    .plan-card {
        padding: 16px 0;
        border-left: none;
        border-top: 1px solid var(--rule-soft);
    }

    .plan-card:first-child {
        border-top: none;
        padding-top: 18px;
    }

    .plan-card:last-child {
        padding-bottom: 20px;
    }

    .region-hint {
        text-align: left;
    }

    .ticket {
        margin-top: 26px;
    }

    .ticket-main {
        padding: 22px 20px 24px;
    }

    .ticket-stub {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    #publicRuntimeCard {
        grid-column: 1;
        grid-row: auto;
        margin-top: 20px;
        padding-top: 14px;
        border-top: 1px solid var(--rule);
    }
}

@media (max-width: 480px) {
    .masthead {
        align-items: flex-start;
    }

    .pause-stamp {
        font-size: 10.5px;
        padding: 3px 8px;
        letter-spacing: 0.06em;
    }

    .hero h1 {
        font-size: 30px;
    }

    .wordmark-text {
        font-size: 14px;
    }

    .tab-nav {
        gap: 22px;
    }

    #cdkInput,
    #queryInput {
        font-size: 16px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
