:root {
    /* Light theme, same palette as the app (front/app/app/globals.css): a flat pale background, white
       panels with a soft shadow, ink text, blue for text accents and lime for filled controls. The
       footer is the page's navy block; the specimen plates keep their painted water and light text. */
    --ink: #0b2233;
    --paper: #f1f7f5;
    --bg: #edf2f5;
    --navy: #0b2a40;
    --muted: rgba(11, 34, 51, 0.72);
    --faint: rgba(11, 34, 51, 0.56);
    --line: rgba(11, 34, 51, 0.1);
    --accent: #c8f25a;
    --brand: #0a63ad;
    --panel: #fff;
    --shadow: 0 1px 2px rgba(11, 34, 51, 0.1), 0 3px 10px rgba(11, 34, 51, 0.06);
    --keep: #8bcb94;
    --release: #ef8c6b;
    --serif: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
    --sans: 'Inter', -apple-system, 'Segoe UI', 'PingFang SC', system-ui, sans-serif;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 6px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.02em;
}

.logo img {
    display: block;
    border-radius: 7px;
}

/* ── Header ─────────────────────────────────────────── */
.top {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--line);
}

.top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.top nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
}

.top nav a {
    color: var(--muted);
    transition: color 0.2s;
}

.top nav a:hover {
    color: var(--ink);
}

.top .nav-cta {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--brand);
    color: var(--brand);
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-areas: 'copy plate' 'copy picker';
    column-gap: 56px;
    row-gap: 16px;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 56px;
}

.hero-copy {
    grid-area: copy;
    max-width: 520px;
}

h1 {
    font-family: var(--serif);
    font-size: clamp(44px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 22px;
}

.lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 36px;
    max-width: 460px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.cta {
    display: inline-flex;
    align-items: center;
    height: 52px;
    padding: 0 30px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(120, 170, 20, 0.4);
    transition: transform 0.15s;
}

.cta:hover {
    transform: translateY(-1px);
}

.qr {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 280px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.qr svg {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    padding: 6px;
    border-radius: 10px;
    background: var(--paper);
}

/* 手机上扫码没意义 */
@media (pointer: coarse) {
    .qr {
        display: none;
    }
}

/* ── Specimen plate: painted fish on a measuring board ── */
.plate {
    grid-area: plate;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #8fd3e8 0%, #2f9bc4 55%, #0b3f4a 100%);
    box-shadow: 0 14px 34px rgba(11, 34, 51, 0.18);
}

.plate-media {
    position: relative;
    aspect-ratio: 3 / 2;
}

.plate-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fade-in 0.5s ease-out;
}

.ruler {
    position: absolute;
    left: 0;
    right: 0;
    top: 72%;
    height: 34px;
    background: rgba(241, 247, 245, 0.88);
    border-top: 1px solid rgba(5, 21, 27, 0.35);
    border-bottom: 1px solid rgba(5, 21, 27, 0.35);
}

.tick {
    position: absolute;
    top: 0;
    width: 1px;
    height: 8px;
    background: rgba(5, 21, 27, 0.55);
}

.tick.major {
    height: 13px;
    background: rgba(5, 21, 27, 0.8);
}

.tick em {
    position: absolute;
    top: 12px;
    left: -8px;
    width: 16px;
    text-align: center;
    font-style: normal;
    font-size: 10px;
    color: rgba(5, 21, 27, 0.7);
    font-variant-numeric: tabular-nums;
}

.min-line {
    position: absolute;
    top: -6px;
    bottom: -6px;
    border-left: 2px dashed #0b3f4a;
}

.min-line em {
    position: absolute;
    bottom: -18px;
    left: 4px;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--paper);
}

.length-mark {
    position: absolute;
    top: -10px;
    bottom: -10px;
    width: 3px;
    margin-left: -1.5px;
    background: var(--ink);
    border-radius: 2px;
    animation: measure 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.plate figcaption {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 30px 22px 20px;
}

.who strong {
    display: block;
    font-family: var(--serif);
    font-size: 26px;
    line-height: 1.1;
}

.who i {
    display: block;
    margin: 2px 0 6px;
    font-size: 13px;
    color: rgba(241, 247, 245, 0.75);
}

.who span {
    font-size: 13px;
    color: rgba(241, 247, 245, 0.85);
    font-variant-numeric: tabular-nums;
}

/* 鱼标签：像系在鱼尾上的牌子 */
.tag {
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 10px;
    text-align: right;
    border: 2px solid currentColor;
    background: rgba(5, 21, 27, 0.72);
}

.tag b {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.04em;
}

.tag small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--paper);
}

.tag.keep {
    color: var(--keep);
}

.tag.release {
    color: var(--release);
}

.picker {
    grid-area: picker;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.picker button {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition:
        color 0.2s,
        border-color 0.2s;
}

.picker button:hover {
    color: var(--ink);
}

.picker button[aria-selected='true'] {
    background: var(--accent);
    border-color: var(--brand);
    color: var(--ink);
}

/* 没有 JS 时只显示第一条，切换按钮没用 */
html:not(.js) .picker {
    visibility: hidden;
}

/* ── Sections ───────────────────────────────────────── */
.section {
    padding-top: 72px;
    padding-bottom: 72px;
    border-top: 1px solid var(--line);
}

.head {
    max-width: 620px;
    margin-bottom: 36px;
}

h2 {
    font-family: var(--serif);
    font-size: clamp(30px, 3.6vw, 42px);
    line-height: 1.1;
    margin: 0 0 12px;
}

.head p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--muted);
}

.guide {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.guide a {
    display: flex;
    flex-direction: column;
}

.guide img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: filter 0.2s;
}

.guide a:hover img {
    filter: brightness(1.08);
}

.guide strong {
    font-size: 16px;
    font-weight: 600;
}

.guide i {
    margin: 2px 0 4px;
    font-size: 13px;
    color: var(--muted);
}

.guide span {
    font-size: 12px;
    color: var(--faint);
}

.states {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    border-top: 1px solid var(--line);
}

.states li {
    border-bottom: 1px solid var(--line);
}

.states a {
    display: grid;
    grid-template-columns: 48px 1fr;
    row-gap: 2px;
    padding: 16px 4px;
}

.states .code {
    grid-row: span 2;
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1.2;
    color: var(--brand);
}

.states .name {
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s;
}

.states a:hover .name {
    color: var(--brand);
}

.states .meta {
    font-size: 13px;
    color: var(--muted);
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    border-top: 2px solid var(--brand);
    padding-top: 16px;
}

.steps li::before {
    content: counter(step);
    font-family: var(--serif);
    font-size: 15px;
    color: var(--brand);
}

.steps b {
    display: block;
    margin: 4px 0 8px;
    font-family: var(--serif);
    font-size: 24px;
}

.steps p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

/* ── Footer ─────────────────────────────────────────── */
.foot {
    --muted: rgba(241, 247, 245, 0.74);
    --faint: rgba(241, 247, 245, 0.56);
    --line: rgba(241, 247, 245, 0.14);
    background: var(--navy);
    color: var(--paper);
}

.foot-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    padding-top: 28px;
    padding-bottom: 28px;
    font-size: 13px;
    color: var(--muted);
}

.foot .logo {
    font-size: 20px;
    color: var(--paper);
}

.foot nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-right: auto;
}

.foot nav a:hover {
    color: var(--paper);
}

/* ── Motion ─────────────────────────────────────────── */
@keyframes fade-in {
    from {
        opacity: 0;
    }
}

/* 量鱼：长度线从 0 滑到这条鱼的长度（终点是行内的 left） */
@keyframes measure {
    from {
        left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plate-media img,
    .length-mark {
        animation: none;
    }
}

/* ── Narrow screens ─────────────────────────────────── */
@media (max-width: 960px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'copy' 'plate' 'picker';
        padding-top: 48px;
        padding-bottom: 40px;
    }

    .section {
        padding-top: 56px;
        padding-bottom: 56px;
    }
}

@media (max-width: 760px) {
    .steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .wrap {
        padding-left: 20px;
        padding-right: 20px;
    }

    .top nav a:not(.nav-cta) {
        display: none;
    }

    .plate figcaption {
        flex-direction: column;
        align-items: flex-start;
    }

    .tag {
        text-align: left;
    }
}

/* ══ Content pages (species, regulations, guides) ═══════ */
.top nav a[aria-current='page'] {
    color: var(--ink);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--faint);
}

.crumbs a {
    color: var(--muted);
}

.crumbs a:hover {
    color: var(--brand);
}

.crumbs i {
    font-style: normal;
    opacity: 0.5;
}

.page-head {
    padding-top: 56px;
    padding-bottom: 40px;
}

.page-head h1,
.sp-intro h1,
.article h1 {
    font-size: clamp(38px, 4.6vw, 60px);
    line-height: 1.05;
    margin: 0 0 16px;
}

.page-head .lead {
    max-width: 680px;
    margin: 0;
}

.page-head .lead a,
.prose a,
.body-lg a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.section.flush {
    border-top: 0;
    padding-top: 8px;
}

h2.group {
    font-size: 26px;
    margin-bottom: 20px;
}

.note {
    margin: -4px 0 18px;
    font-size: 14px;
    color: var(--muted);
}

.disclaimer {
    margin: 20px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--faint);
}

.more {
    margin: 28px 0 0;
}

.more a {
    color: var(--brand);
}

/* 正文 + 侧栏 */
.with-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 64px;
    padding-bottom: 88px;
}

.with-aside article > section {
    margin-top: 48px;
}

.with-aside article > section:first-child {
    margin-top: 0;
}

.with-aside h2 {
    font-size: 30px;
}

.with-aside aside {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-self: start;
    position: sticky;
    top: 88px;
}

aside h3 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--faint);
}

.links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    font-size: 15px;
    line-height: 1.4;
}

.links a {
    color: var(--ink);
}

.links a:hover {
    color: var(--brand);
}

.links small {
    display: block;
    color: var(--faint);
    font-size: 12px;
}

.links.cols {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px 24px;
}

.mini {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.mini a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.mini a:hover {
    color: var(--brand);
}

.mini img {
    width: 64px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 6px;
}

.app-cta {
    padding: 20px;
    border-radius: 10px;

}

.app-cta p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

.app-cta .cta {
    height: 42px;
    padding: 0 20px;
    font-size: 14px;
}

.body-lg {
    margin: 0;
    font-size: 17px;
    line-height: 1.75;
    color: rgba(11, 34, 51, 0.86);
    max-width: 72ch;
}

/* ── Species page ───────────────────────────────────── */
.sp-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: center;
    padding-top: 48px;
    padding-bottom: 56px;
}

.sp-intro .sci {
    margin: -6px 0 28px;
    font-size: 18px;
    color: var(--muted);
}

.facts {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.facts dt {
    font-size: 12px;
    color: var(--faint);
    margin-bottom: 4px;
}

.facts dd {
    margin: 0;
    font-size: 15px;
}

.sp-plate {
    margin: 0;
    background: linear-gradient(180deg, #8fd3e8 0%, #2f9bc4 62%, #125a66 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(11, 34, 51, 0.18);
}

.sp-plate img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.methods {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.method {
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.method .when {
    display: inline-block;
    margin-bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    background: var(--accent);
}

.method dl {
    margin: 0;
    display: grid;
    gap: 10px;
}

.method dt {
    font-size: 12px;
    color: var(--faint);
}

.method dd {
    margin: 2px 0 0;
    font-size: 15px;
}

.method small {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

/* ── Rules table + season bar ───────────────────────── */
.rules {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.rules th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--faint);
    padding: 0 12px 10px 0;
    border-bottom: 1px solid var(--line);
}

.rules td {
    padding: 14px 12px 14px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    line-height: 1.5;
}

.rules td:first-child {
    min-width: 180px;
}

.rules td small {
    display: block;
    font-size: 12px;
    color: var(--faint);
    text-transform: capitalize;
}

.rules a:hover {
    color: var(--brand);
}

.rules .code {
    font-family: var(--serif);
    color: var(--brand);
    margin-right: 6px;
}

.rules .sp {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.rules .sp img {
    width: 54px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 6px;
}

.rules .src {
    font-size: 12px;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.season {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    min-width: 168px;
    max-width: 260px;
}

.season span {
    height: 22px;
    display: grid;
    place-items: center;
    font-size: 10px;
    border-radius: 3px;
    color: var(--faint);
    background: rgba(11, 34, 51, 0.07);
}

.season span.open {
    color: var(--ink);
    background: var(--keep);
}

.spots {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.spots a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    font-size: 14px;
}

.spots a:hover {
    border-color: var(--brand);
}

.spots span {
    color: var(--faint);
    font-size: 12px;
}

/* ── State + species rule card ──────────────────────── */
.plate,
.sp-plate,
.rule-card {
    color: var(--paper);
}

.rule-card {
    margin-bottom: 24px;
    padding: 0 0 22px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #8fd3e8 0%, #2f9bc4 46%, #082e37 100%);
}

.rule-card > .kicker {
    margin: 0;
    padding: 14px 22px 0;
    color: var(--ink);
}

.rule-card > img {
    width: 100%;
    aspect-ratio: 3 / 1.4;
    object-fit: cover;
    object-position: center 45%;
}

.board {
    position: relative;
    height: 34px;
    margin: 0 0 30px;
}

.board .ruler {
    top: 0;
}

.slot {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(200, 242, 90, 0.38);
}

.slot em {
    position: absolute;
    bottom: -20px;
    left: 4px;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--paper);
}

.min-line.max {
    border-left-style: solid;
    border-color: #4d3a16;
}

.rule-season {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 22px;
    font-size: 13px;
    color: var(--paper);
}

.rule-season .season {
    flex: 1;
    max-width: none;
}

.rule-season .season span:not(.open) {
    background: rgba(5, 21, 27, 0.35);
    color: rgba(241, 247, 245, 0.55);
}

.rule-facts {
    list-style: none;
    margin: 18px 22px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rule-facts li {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    background: rgba(5, 21, 27, 0.6);
}

.rule-notes {
    margin: 16px 22px 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(241, 247, 245, 0.88);
}

.rule-card .source {
    margin: 14px 22px 0;
    color: rgba(241, 247, 245, 0.8);
}

.rule-card .source a {
    color: var(--paper);
}

.source {
    font-size: 13px;
    color: var(--muted);
}

.source a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Guides ─────────────────────────────────────────── */
.kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--brand);
}

.guide-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.guide-cards a {
    display: block;
    height: 100%;
    padding: 20px 22px;
    border-radius: 10px;
    border: 1px solid var(--line);
    transition: border-color 0.2s;
}

.guide-cards a:hover {
    border-color: var(--brand);
}

.guide-cards .kicker {
    display: block;
}

.guide-cards strong {
    display: block;
    margin-bottom: 8px;
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.25;
}

.guide-cards p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.article {
    padding-top: 48px;
}

.article .lead {
    max-width: 68ch;
}

.prose {
    max-width: 68ch;
    font-size: 17px;
    line-height: 1.75;
    color: rgba(11, 34, 51, 0.86);
}

.prose h2 {
    font-size: 28px;
    margin: 40px 0 12px;
    color: var(--ink);
}

.prose h3 {
    font-size: 20px;
    margin: 28px 0 8px;
    color: var(--ink);
}

.prose ol,
.prose ul {
    padding-left: 1.3em;
}

.prose li {
    margin: 6px 0;
}

.prose strong {
    color: var(--ink);
}

.prose code {
    font-size: 0.9em;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(11, 34, 51, 0.06);
}

.faq {
    max-width: 68ch;
    margin-top: 48px;
}

.faq details {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}

.faq details p {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--muted);
}

.nf {
    padding-top: 120px;
    padding-bottom: 160px;
}

@media (max-width: 960px) {
    .with-aside,
    .sp-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .with-aside aside {
        position: static;
    }

    .rules th:nth-child(3),
    .rules td:nth-child(3) {
        display: none;
    }
}

/* ── Spots ──────────────────────────────────────────── */
.letters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
}

.letters a {
    min-width: 34px;
    padding: 6px 0;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-size: 14px;
}

.letters a:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.spot-map {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 16 / 9;
    background: #dde6ec;
}

.spot-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(0.85);
}

.spot-facts {
    margin-top: 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.spot-facts small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--faint);
}

.spot-facts a {
    color: var(--brand);
}

.species-row {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

@media (max-width: 760px) {
    .spot-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ══ Surfaces ════════════════════════════════════════════════════════════════
   Everything below restyles the structure above into one surface recipe (.panel and friends) used at
   three scales — large panels, cards, compact controls: a white fill and a soft shadow, no outline.
   The ::before layer is a 1px ring that only shows, in blue, on hover. */
h1,
h2,
h3,
.logo {
    letter-spacing: -0.025em;
}

/* The surface */
.panel,
.badge,
.ghost,
.tile,
.method,
.guide a,
.guide-cards a,
.states a,
.steps li,
.app-cta,
.spots a,
.letters a,
.picker button,
.spot-map,
.facts > div,
.faq details {
    position: relative;
    border: 0;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.panel::before,
.badge::before,
.ghost::before,
.tile::before,
.method::before,
.guide a::before,
.guide-cards a::before,
.states a::before,
.steps li::before,
.app-cta::before,
.spots a::before,
.letters a::before,
.picker button::before,
.spot-map::before,
.facts > div::before,
.faq details::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background: transparent;
    pointer-events: none;
    transition: background 0.2s;
}

.panel {
    border-radius: 14px;
}

a.ghost:hover::before,
.guide a:hover::before,
.guide-cards a:hover::before,
.states a:hover::before,
.spots a:hover::before,
.letters a:hover::before {
    background: var(--brand);
}

.guide a,
.guide-cards a,
.states a,
.spots a {
    transition: transform 0.2s;
}

.guide a:hover,
.guide-cards a:hover,
.states a:hover {
    transform: translateY(-2px);
}

/* Header: a plain bar across the page, no box around the links */
.top {
    top: 0;
    padding: 0;
    background: rgba(237, 242, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 0;
    border-bottom: 1px solid var(--line);
}

.top-inner {
    height: 60px;
    gap: 20px;
}

.top .logo {
    font-size: 19px;
    font-weight: 700;
}

.top nav {
    gap: 4px;
    margin: 0 auto;
}

.top nav a {
    padding: 8px 14px;
    border-radius: 10px;
}

.top nav a[aria-current='page'] {
    background: rgba(11, 34, 51, 0.07);
}

.top .nav-cta {
    padding: 9px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(120, 170, 20, 0.35);
}

/* Buttons */
.cta {
    border-radius: 10px;
}

.ghost {
    display: inline-flex;
    align-items: center;
    height: 52px;
    padding: 0 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
}

/* Home hero: centered, one focal headline */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 84px;
    padding-bottom: 56px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    margin-bottom: 28px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--muted);
}

.badge b {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    font-size: 12px;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(44px, 7vw, 84px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin: 0 0 22px;
}

.grad {
    padding: 0 0.08em;
    background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.hero .lead {
    max-width: 600px;
    margin: 0 0 32px;
}

.actions {
    gap: 12px;
    justify-content: center;
}

.fine {
    margin: 18px 0 0;
    font-size: 13px;
    color: var(--faint);
}

/* Product demo panel */
.demo {
    padding: 18px;
}

.demo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 4px 6px 16px;
}

.demo-head strong {
    display: block;
    font-size: 16px;
}

.demo-head span {
    font-size: 13px;
    color: var(--muted);
}

.demo-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
}

.demo .plate {
    grid-area: auto;
    box-shadow: none;
    border-radius: 10px;
}

.demo-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tile {
    border-radius: 10px;
    padding: 18px;
}

.tile.qr {
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
}

.tile.qr svg {
    width: 112px;
    height: 112px;
}

.tile.qr b {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--ink);
}

.checks {
    flex: 1;
}

.checks b {
    display: block;
    margin-bottom: 14px;
    font-size: 15px;
}

.checks ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
    font-size: 14px;
    color: var(--muted);
}

.checks li {
    padding-left: 26px;
    background: no-repeat left center / 16px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230a63ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5'/%3E%3C/svg%3E");
}

.picker {
    grid-area: auto;
}

.picker button {
    color: var(--muted);
}

.picker button[aria-selected='true'] {
    background: var(--accent);
    color: var(--ink);
    box-shadow: 0 3px 10px rgba(120, 170, 20, 0.35);
}

.picker button[aria-selected='true']::before {
    display: none;
}

/* Metric strip */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 18px 0 0;
    padding: 26px 8px;
    text-align: center;
}

.stats div + div {
    border-left: 1px solid var(--line);
}

.stats dt {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.stats dd {
    margin: 6px 0 0;
    padding: 0 8px;
    font-size: 13px;
    color: var(--muted);
}

/* Sections */
.section {
    border-top: 0;
    padding-top: 96px;
    padding-bottom: 0;
}

main > :last-child {
    padding-bottom: 96px;
}

.head.center {
    max-width: 640px;
    margin: 0 auto 44px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 14px !important;
    font-size: 12px !important;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand) !important;
}

.more.center {
    text-align: center;
    margin-top: 32px;
}

.more .ghost {
    height: 44px;
    font-size: 14px;
    color: var(--ink);
}

/* Steps: numbered cards */
.steps {
    gap: 18px;
}

.steps li {
    border-top: 0;
    border-radius: 12px;
    padding: 24px;
}

.steps li::after {
    content: counter(step);
    order: -1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--ink);
    font-weight: 700;
}

.steps li {
    display: flex;
    flex-direction: column;
}

.steps b {
    margin: 0 0 8px;
    font-size: 20px;
}

/* Species cards */
.guide {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.guide a {
    height: 100%;
    padding: 12px 12px 16px;
    border-radius: 12px;
}

.guide img {
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(143, 211, 232, 0.2), rgba(47, 155, 196, 0.08));
}

.guide strong,
.guide i,
.guide span {
    padding: 0 6px;
}

/* State cards */
.states {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    border-top: 0;
}

.states li {
    border-bottom: 0;
}

.states a {
    grid-template-columns: 56px 1fr;
    align-items: center;
    padding: 16px 18px;
    border-radius: 12px;
}

.states .code {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(10, 99, 173, 0.1);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

/* Cards */
.method,
.guide-cards a,
.app-cta {
    border-radius: 12px;
}

.guide-cards strong {
    font-family: var(--serif);
}

/* Closing call to action */
.final {
    padding: 64px 24px;
    text-align: center;
    background:
        radial-gradient(60% 90% at 50% 0%, rgba(10, 99, 173, 0.12), transparent 70%),
        var(--panel);
}

.final h2 {
    max-width: 640px;
    margin: 0 auto 14px;
}

.final p {
    max-width: 520px;
    margin: 0 auto 28px;
    line-height: 1.6;
    color: var(--muted);
}

/* Footer */
.foot {
    margin-top: 0;
}

.foot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding-top: 56px;
    padding-bottom: 40px;
}

.foot-brand p {
    max-width: 300px;
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.foot nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.foot h4 {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
}

.foot-base {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 20px;
    padding-bottom: 28px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--faint);
}

/* Content pages */
.page-head {
    padding-top: 72px;
}

.with-aside {
    gap: 40px;
}

.with-aside aside {
    gap: 16px;
    top: 80px;
}

.panel.side {
    padding: 20px;
    border-radius: 12px;
}

.panel.table {
    padding: 8px 20px;
    border-radius: 12px;
    overflow-x: auto;
}

.panel.table .rules th {
    padding-top: 14px;
}

.panel.table .rules tr:last-child td {
    border-bottom: 0;
}

.facts {
    gap: 12px;
}

.facts > div {
    padding: 14px 16px;
    border-radius: 10px;
}

.sp-plate,
.rule-card {
    box-shadow: var(--shadow);
}

.faq details {
    margin-bottom: 10px;
    padding: 16px 18px;
    border-radius: 10px;
}

.letters a {
    border-radius: 10px;
}

.spots a {
    border-radius: 12px;
}

@media (max-width: 960px) {
    .hero {
        padding-top: 56px;
        padding-bottom: 40px;
    }

    .demo-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-side {
        flex-direction: row;
    }

    .demo-side > * {
        flex: 1;
    }

    .section {
        padding-top: 72px;
        padding-bottom: 0;
    }

    .foot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .actions {
        flex-direction: column;
        align-self: stretch;
    }

    .actions .cta,
    .actions .ghost {
        justify-content: center;
    }

    .demo {
        padding: 12px;
    }

    .demo-side {
        flex-direction: column;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 22px;
    }

    .stats div:nth-child(3) {
        border-left: 0;
    }

    .guide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .panel.table {
        padding: 4px 14px;
    }
}

/* Species confidence tag on spot pages */
.conf {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.conf-high {
    color: #177a48;
}

.conf-medium {
    color: var(--muted);
}

.conf-low {
    color: var(--faint);
}

.sp-name {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.conf-note {
    margin-top: 14px;
}

/* Brand wordmark: extra-heavy text on a lime band (same as the app's BrandWordmark) */
.wordmark {
    display: inline-block;
    padding: 0 0.14em;
    font-weight: 800;
    letter-spacing: 0.01em;
    -webkit-text-stroke: 0.5px currentColor;
    background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 90%, transparent 90%);
}

.foot .wordmark {
    background: none;
    padding: 0;
}

/* Home field guide: always three full rows. 15 cards are rendered; the column count is fixed per width
   (same widths at which the auto-fill grid would switch) and the cards past the third row are hidden.
   Phones keep two columns and twelve cards. */
.guide.rows3 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1119px) {
    .guide.rows3 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .guide.rows3 > :nth-child(n + 13) {
        display: none;
    }
}

@media (max-width: 901px) {
    .guide.rows3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .guide.rows3 > :nth-child(n + 10) {
        display: none;
    }
}

@media (max-width: 683px) {
    .guide.rows3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guide.rows3 > :nth-child(n + 10) {
        display: revert;
    }

    .guide.rows3 > :nth-child(n + 13) {
        display: none;
    }
}
