:root {
    --ink: #161711;
    --muted: #667067;
    --line: #dde5dc;
    --paper: #fbfdf9;
    --card: #ffffff;
    --brand: #f6dd1a;
    --brand-ink: #141414;
    --green: #098261;
    --blue: #2f6fbd;
    --warn: #a66400;
    --danger: #b42318;
    --shadow: 0 18px 50px rgba(18, 31, 23, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans HK", "PingFang HK", Arial, sans-serif;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 66px;
    padding: 12px clamp(16px, 4vw, 48px);
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 253, 249, .94);
    backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 4px solid #111;
    border-radius: 50%;
    background: var(--brand);
    font-weight: 950;
    font-size: 26px;
    letter-spacing: 0;
}
.brand strong { display: block; font-size: 18px; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.top-nav { display: flex; gap: 18px; color: var(--muted); font-weight: 700; }
.top-nav a:hover { color: var(--green); }
.header-cta, .button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: white;
    font-weight: 800;
    cursor: pointer;
}
button:disabled { cursor: not-allowed; opacity: .55; }

main { min-height: 68vh; }
.hero, .section, .split-section, .page-hero, .filter-bar, .tool-layout, .detail-layout, .disclaimer, .site-footer {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    gap: 42px;
    align-items: center;
    padding: 56px 0 44px;
}
.hero h1, .page-hero h1 {
    margin: 12px 0 14px;
    max-width: 720px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: .96;
    letter-spacing: 0;
}
.hero p, .page-hero p, .split-section p {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--green) 10%, white);
    color: var(--green);
    font-size: 13px;
    font-weight: 900;
}
.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 28px;
}
input, select {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--ink);
}
input:focus, select:focus {
    outline: 3px solid rgba(9, 130, 97, .16);
    border-color: var(--green);
}
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.chips a {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--muted);
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 700;
}
.chips a:hover { border-color: var(--green); color: var(--green); }

.hero-panel {
    min-height: 430px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(246,221,26,.84), rgba(246,221,26,.18)),
        repeating-linear-gradient(-35deg, rgba(0,0,0,.95) 0 18px, transparent 18px 54px);
    box-shadow: var(--shadow);
}
.phone-card {
    width: min(330px, 88%);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 8px;
    background: rgba(255,255,255,.96);
    padding: 22px;
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
}
.status-dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 99px;
    background: var(--green);
}
.mini-label { margin: 16px 0 0; color: var(--green); font-size: 13px; font-weight: 900; }
.phone-card h2 { margin: 6px 0 18px; font-size: 24px; }
.phone-card dl, .breakdown, .detail-list { margin: 0; display: grid; gap: 9px; }
.phone-card dl div, .breakdown div, .detail-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 36px;
    border-bottom: 1px solid var(--line);
}
dt { color: var(--muted); }
dd { margin: 0; font-weight: 850; text-align: right; }
.fineprint { margin: 16px 0 0; color: var(--muted); font-size: 12px; }

.section { padding: 34px 0; }
.section-head { margin-bottom: 18px; }
.section h2, .split-section h2, .page-hero h1 { margin-top: 10px; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.deal-card, .panel, .recommendation, .tool-form, .empty-state, .directory-card, .disclaimer {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
}
.deal-card { padding: 20px; display: flex; flex-direction: column; min-height: 268px; }
.deal-card h3 { margin: 12px 0 8px; font-size: 21px; line-height: 1.25; }
.deal-card p { color: var(--muted); margin: 0 0 16px; }
.deal-card dl { margin: auto 0 18px; display: grid; gap: 8px; }
.deal-card dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.badge {
    display: inline-flex;
    width: max-content;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 5px;
    background: rgba(47, 111, 189, .1);
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
}
.badge.success { background: rgba(9,130,97,.12); color: var(--green); }
.text-link { margin-top: auto; color: var(--green); font-weight: 900; }

.split-section {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(300px, 1fr);
    gap: 24px;
    padding: 36px 0;
}
.steps { display: grid; gap: 12px; }
.steps div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 18px;
}
.steps span, .muted { color: var(--muted); }

.page-hero.compact { padding: 44px 0 20px; }
.page-hero.compact h1 { font-size: clamp(34px, 5vw, 54px); }
.filter-bar { margin-top: 10px; }
.filter-bar form {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(140px, 1fr)) auto;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.tool-layout, .detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
    gap: 22px;
    padding: 20px 0 44px;
    align-items: start;
}
.detail-layout { grid-template-columns: minmax(0, 1fr) 340px; }
.tool-form, .panel, .empty-state { padding: 20px; }
.tool-form label, .tool-form fieldset { display: grid; gap: 7px; margin: 0 0 14px; }
.tool-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.check-row { display: flex !important; grid-template-columns: none; align-items: center; gap: 9px !important; }
.check-row input { width: auto; min-height: auto; }
.upload-zone {
    min-height: 220px;
    place-items: center;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #f7faf7;
    padding: 24px;
}
.recommendation { padding: 22px; }
.recommendation h2 { margin: 10px 0 16px; font-size: 30px; }
.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.metrics div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f9fbf9;
    padding: 14px;
}
.metrics span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.metrics strong { display: block; margin-top: 5px; font-size: 22px; }
.warning {
    margin-top: 16px;
    border-radius: 8px;
    background: #fff7e6;
    border: 1px solid #f3d39a;
    padding: 14px;
    color: #5f3900;
}
.warning p { margin: 6px 0 0; }
.directory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.directory-card { padding: 18px; }
.directory-card h2 { margin: 0 0 6px; font-size: 20px; }
.directory-card p { margin: 0; color: var(--muted); }
.empty-state { display: grid; min-height: 320px; place-items: center; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); }
.disclaimer { margin-top: 26px; margin-bottom: 26px; padding: 18px; }
.disclaimer strong { color: var(--warn); }
.disclaimer p { margin: 8px 0 0; color: var(--muted); }

.site-footer {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 28px 0 40px;
    color: var(--muted);
}
.site-footer p { margin: 8px 0 0; max-width: 560px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; font-weight: 800; }

@media (max-width: 860px) {
    .top-nav { display: none; }
    .hero, .split-section, .tool-layout, .detail-layout { grid-template-columns: 1fr; }
    .hero { padding-top: 34px; }
    .hero-search, .filter-bar form { grid-template-columns: 1fr; }
    .card-grid, .directory-grid { grid-template-columns: 1fr; }
    .metrics { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; }
    .header-cta { min-width: 82px; }
}
