/* Serpo.one: original Blade/CSS patterns, guided by the documented component review. */
:root {
  --state-info-ground: #eaf0fb;
  --state-info-ink: #2d5691;
  --state-warning-ground: #fff4db;
  --state-warning-ink: #79561e;
  --state-error-ground: #fbeded;
  --state-error-ink: #9a3038;
  --control-border: #b8c7ce;
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 24px; }
.hero-copy .hero-actions + .free-access-note { margin-top: 22px !important; }
.hero-actions .text-action { font-size: 14px; font-weight: 550; }
.hero h1 { max-width: 19ch; line-height: 1.1; }
.hero-copy > p:not(.free-access-note) { max-width: 47ch; line-height: 1.65; }
.demo-table tbody th { background: transparent; font-size: inherit; font-weight: 500; color: var(--ink); white-space: normal; }
.demo-table td { font-variant-numeric: tabular-nums; }
.setup-section { display: grid; grid-template-columns: minmax(200px, .7fr) minmax(0, 1.3fr); gap: 50px; padding-block: 46px 55px; border-block: 1px solid var(--line); scroll-margin-top: 25px; }
.setup-intro h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); max-width: 19ch; margin-bottom: 16px; }
.setup-intro p { font-size: 14px; margin-bottom: 0; max-width: 37ch; }
.setup-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; margin: 0; padding: 0; list-style: none; }
.setup-steps li { min-width: 0; }
.setup-step-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 650; margin-bottom: 19px; }
.setup-steps h3 { font-size: 16px; line-height: 1.35; margin-bottom: 10px; letter-spacing: -.015em; }
.setup-steps p { font-size: 13px; line-height: 1.65; margin-bottom: 0; }
.feature-section { padding-top: 65px; }
.feature-list { column-gap: 70px; }
.feature-list h3, .feature-list h2 { font-size: 21px; max-width: 32ch; }
.feature-list p { max-width: 61ch; font-size: 15px; }
.feature-page .setup-section { margin-block: 65px 35px; }
.capability-details { margin-top: 55px; border-top: 1px solid var(--line); }
.capability-details > section { display: grid; grid-template-columns: minmax(180px, .6fr) minmax(0, 1.4fr); column-gap: 45px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.capability-details h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.capability-details p { margin: 0; font-size: 15px; max-width: 72ch; }
.closing { border-top: 1px solid var(--line); }
.closing h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); }
.closing p { margin: 14px 0 0; font-size: 14px; max-width: 65ch; }
.closing > .btn { flex-shrink: 0; }
.registration-intro { margin-top: -10px; margin-bottom: 27px; }
.auth-panel form > .help { font-size: 12px; margin-top: -9px; margin-bottom: 20px; }
.next-action { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 25px 28px; background: #edf5f0; border: 1px solid #ccdfd2; border-radius: 12px; margin-bottom: 26px; }
.next-action h2 { font-size: 18px; line-height: 1.35; margin-bottom: 8px; }
.next-action p { font-size: 13px; color: #3c5c4b; margin: 0; max-width: 72ch; }
.next-action > .btn { flex-shrink: 0; max-width: 40%; white-space: normal; text-align: start; }
.next-action-copy { min-width: 0; }
.project-empty { max-width: 760px; }
.project-empty h2 { line-height: 1.35; }
.project-empty p { max-width: 62ch; }
.settings-jump { display: flex; flex-wrap: wrap; gap: 10px 25px; margin-bottom: 27px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.settings-jump a { font-size: 12px; }
.credential-heading { display: flex; align-items: center; gap: 14px; margin-block: 30px 15px; }
.credential-heading h3 { margin: 0; font-size: 16px; }
.credential-heading + form { margin-bottom: 12px; }
.settings-jump + .panel, #provider-credentials, #account-security, #search-defaults, #project-settings { scroll-margin-top: 24px; }
.context-region-summary { font-size: 12px; margin-top: 3px; color: var(--muted); }
.app-body .matrix-context { font-size: 11px; line-height: 1.65; }
.app-body .matrix .badge { font-size: 11px; }
.app-body .matrix .query-cell .btn-small { font-size: 11px; min-height: 32px; padding-inline: 11px; }
.app-body .matrix th[data-domain-name] { font-size: 12px; }
.app-body .matrix tbody th[scope="row"] { font-size: 12px; font-weight: 400; background: white; color: var(--ink); white-space: normal; }
.app-body .matrix .position { font-size: 15px; font-variant-numeric: tabular-nums; }
.app-body .table caption { text-align: start; padding: 15px 20px; font-size: 12px; color: var(--muted); }
.column-handle { min-height: 24px; }
.app-body .field-error { margin-top: 7px; margin-bottom: 0; color: var(--danger); font-size: 12px; }
.app-body [aria-invalid="true"] { border-color: var(--danger); }
.select-empty { font-size: 12px; padding: 10px 12px; margin: 0; }
.location-status { min-height: 1.5em; font-size: 12px; color: var(--muted); margin-top: 6px; }
.location-status[data-state="error"] { color: var(--danger); }
.location-results { top: auto; margin-top: -4px; }
.location-search { min-width: 0; }
.location-results button[aria-selected="true"] { background: var(--green-soft); color: var(--green); }
.app-sidebar { overflow-y: auto; overscroll-behavior-y: contain; }
.app-sidebar .sidebar-account { margin-top: auto; flex-shrink: 0; }
.app-sidebar nav, .app-sidebar > .brand { flex-shrink: 0; }
.app-body select:not(.sr-only) { background: white; color: var(--ink); border: 1px solid var(--control-border); border-radius: 7px; width: 100%; }
.badge-partial, .badge-uncertain { background: var(--state-warning-ground); color: var(--state-warning-ink); }
@media (max-width: 1050px) {
  .setup-section { grid-template-columns: 1fr; gap: 30px; }
  .setup-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
  .setup-intro h2 { margin-bottom: 0; }
  .next-action { align-items: start; }
}
@media (max-width: 760px) {
  .public-header nav { flex-wrap: wrap; gap: 12px 22px; }
  .public-header nav a { font-size: 13px; line-height: 1.4; padding-block: 4px; }
  .hero { padding-top: 32px; padding-bottom: 45px; }
  .hero h1 { font-size: clamp(2rem, 6.8vw, 3rem); max-width: 21ch; margin-bottom: 22px; }
  .hero-copy > p:not(.free-access-note) { font-size: 16px; }
  .hero .demo-board { min-width: 0; }
  .demo-table { table-layout: fixed; }
  .demo-table th:first-child { width: 36%; }
  .demo-table th, .demo-table td { overflow-wrap: anywhere; padding: 12px 9px; }
  .demo-table thead th { white-space: normal; font-size: 11px; }
  .demo-toolbar, .demo-bottom { padding: 16px; flex-wrap: wrap; gap: 7px; }
  .demo-table tbody th { font-size: 12px; }
  .setup-section { padding-block: 32px 36px; gap: 28px; }
  .setup-intro { display: block; }
  .setup-intro h2 { margin-bottom: 12px; max-width: none; }
  .setup-intro p { max-width: 65ch; }
  .setup-steps { grid-template-columns: 1fr; gap: 25px; }
  .setup-steps li { display: flex; gap: 17px; }
  .setup-step-number { flex-shrink: 0; margin: 1px 0 0; }
  .setup-steps h3 { margin-bottom: 6px; }
  .setup-steps p { max-width: 66ch; }
  .feature-section { padding-top: 43px; }
  .feature-list { margin-block: 30px; row-gap: 24px; }
  .feature-list h3, .feature-list h2 { font-size: 19px; }
  .capability-details > section { grid-template-columns: 1fr; gap: 12px; }
  .closing { padding-top: 36px; padding-bottom: 45px; }
  .next-action { padding: 21px; gap: 20px; flex-direction: column; }
  .next-action > .btn { max-width: 100%; }
  .app-body.navigation-open .app-sidebar { z-index: 110; }
  .app-sidebar { transition: transform .18s ease; }
  .app-body.navigation-open { overflow: hidden; }
  .app-body .wizard-steps li { line-height: 1.5; }
  .settings-jump { gap: 10px 20px; }
  .settings-jump a { padding-block: 5px; }
  .app-body input:not([type="checkbox"]):not([type="radio"]), .app-body textarea, .app-body select { font-size: 16px; }
  .app-body .select-control > button { font-size: 14px; }
  .app-body .location-results { font-size: 14px; }
  .location-search .location-status { font-size: 12px; }
}
@media (pointer: coarse) {
  .app-body .btn, .app-body button, .app-body select:not(.sr-only), .language-picker summary { min-height: 44px; }
  .app-body .matrix .query-cell .btn-small { min-height: 40px; }
  .app-body .select-menu button { min-height: 44px; }
  .app-body .navigation-close { min-width: 44px; min-height: 44px !important; }
  .domain-options label { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .next-action .btn, .hero-actions .btn, .settings-jump a { transition: background-color .16s ease-out, color .16s ease-out, border-color .16s ease-out; }
}

/* One Serpo palette for public, authentication and operational pages. */
.public-body,.guest-body { background:var(--ground); color:var(--ink); }
.public-header.shell { width:100%; max-width:none; padding-inline:max(20px,calc((100% - 1180px)/2)); background:var(--header); min-height:80px; gap:24px; }
.public-header .brand { color:white; }.public-header .brand span { color:#acdaca; }
.public-header nav a { color:#e4eaf0; }.public-header nav a:hover { color:white; text-decoration:underline; }
.public-header .language-picker>summary { background:transparent; border-color:#607184; color:white; }
.public-header .header-actions>.btn { background:white; color:var(--ink); border-color:white; }
.public-header :is(a,button,summary):focus-visible { outline:2px solid white; outline-offset:3px; }
.public-footer.shell { width:100%; max-width:none; padding:40px max(20px,calc((100% - 1180px)/2)); background:var(--header); color:#e4eaf0; }
.public-footer .brand { color:white; }.public-footer .brand span { color:#acdaca; }
.public-footer :is(a,h2),.public-footer .footer-providers { color:#e4eaf0; }
.guest-body .auth-panel { border-radius:5px; border:1px solid var(--line); box-shadow:none; }
.app-body[data-admin-portal] .app-topbar { background:var(--header); color:white; border:0; }
.app-body[data-admin-portal] .topbar-context,.app-body[data-admin-portal] .topbar-context strong,.app-body[data-admin-portal] .navigation-toggle { color:white; }
.app-body[data-admin-portal] .app-topbar .language-picker>summary { background:transparent; color:white; border-color:#607184; }
::selection { background:var(--green-soft); color:var(--ink); }
input,textarea { caret-color:var(--green); }
@media(max-width:760px){
 .public-header.shell { min-height:72px; padding:16px 20px; gap:16px; }
 .public-header nav { gap:12px 20px; }
 .public-header nav a { min-height:44px; display:inline-flex; align-items:center; }
 .public-footer.shell { padding:32px 20px; }
 .public-body .btn,.guest-body .btn { min-height:44px; }
}
.public-footer a:not(.brand) { color:#e4eaf0; }
h1,h2,h3 { overflow-wrap:anywhere; }
@media(max-width:760px){
 .public-header.shell { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; }
 .public-header .brand { grid-column:1; grid-row:1; }
 .public-header .header-actions { grid-column:2; grid-row:1; gap:8px; }
 .public-header nav { grid-row:2; grid-column:1/-1; flex-wrap:wrap; min-width:0; max-width:100%; padding-bottom:4px; }
 .language-picker .language-menu { position:fixed; top:72px; inset-inline:16px; width:auto; max-width:none; max-height:60dvh; }
}
@media(max-width:359px){ .public-header .brand { font-size:20px; }.public-header .language-picker>summary { padding-inline:8px; } }
@media(max-width:760px),(any-pointer:coarse){
 .public-header .language-picker>summary,.language-menu a,.guest-body form>button { min-height:44px; }
}

/* Tables fit their parent. Values, labels and actions may wrap independently. */
.app-body .workspace :is(.table, .domain-management-table, .serp-results) {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.app-body .workspace :is(table th, table td) {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}
.app-body .workspace table :is(.badge, .btn) {
    max-width: 100%;
    white-space: normal;
    text-align: start;
}
.app-body .workspace table input:not([type=checkbox]):not([type=radio]) { min-width: 0; }
.app-body .workspace table form { min-width: 0; }
.app-body .workspace .table-wrap { min-width: 0; }
.app-body .responsive-label { display: none; }
@media (max-width: 760px) {
    .app-body .workspace :is(.table, .domain-management-table, .serp-results) { table-layout: auto; }
    .app-body .responsive-table :is(tbody, thead) { display: block; }
    .app-body .responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    .app-body .workspace .responsive-table > tbody > tr {
        display: grid;
        gap: 8px;
        padding: 12px;
        border-bottom: 1px solid var(--line);
    }
    .app-body .workspace .responsive-table > tbody > tr:last-child { border-bottom: 0; }
    .app-body .workspace .responsive-table > tbody > tr > :is(th, td) {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        align-items: start;
        gap: 12px;
        min-width: 0;
        width: auto;
        max-width: none;
        padding: 0;
        border: 0;
        background: transparent;
        text-align: start;
    }
    .app-body .workspace .responsive-table td[colspan] { display: block; }
    .app-body .responsive-label { display: block; color: var(--muted); font-size: 12px; }
    .app-body .responsive-value { min-width: 0; }
}
@media (max-width: 760px) {
    .app-body .responsive-table thead:has(input) {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip-path: none;
    }
    .app-body .responsive-table thead:has(input) th:not(:has(input)) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        padding: 0;
    }
    .app-body .responsive-table thead label:has(input),
    .app-body .responsive-table tbody label:has(input[type=checkbox]) {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
    .app-body .responsive-table :is(.project-tops, .project-movement) { white-space: normal; }
}

.developer-docs pre, .app-body .workspace pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Public navigation has one compact row and a separate disclosure on narrow screens. */
.public-header[data-public-header] { position: relative; }
.public-header .public-navigation { display: flex; align-items: center; gap: 20px; }
.public-header[data-public-header] .header-actions { order: 1; }
.public-header .public-menu-toggle,
.public-header .public-menu-close { display: none; }

@media (max-width: 1100px) {
    .public-header[data-public-header].shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        min-height: 64px;
        padding: 10px clamp(12px, 4vw, 24px);
    }
    .public-header[data-public-header] .brand { font-size: clamp(20px, 5.5vw, 24px); }
    .public-header[data-public-header] .header-actions { order: 0; gap: 8px; }
    .public-header[data-public-header] .header-actions > a { min-height: 44px; }
    .public-header .public-navigation { grid-column: 1 / -1; flex-wrap: wrap; }
    .public-header.has-public-menu .public-menu-toggle {
        display: grid;
        place-items: center;
        inline-size: 44px;
        block-size: 44px;
        padding: 0;
        border: 1px solid #778b9e;
        border-radius: 5px;
        background: transparent;
        color: white;
    }
    .public-header .public-menu-toggle[aria-expanded=true] > .icon:first-child { display: none; }
    .public-header .public-menu-toggle[aria-expanded=true] .public-menu-close { display: block; }
    .public-header.has-public-menu .public-navigation { display: none; }
    .public-header.has-public-menu:has(.public-menu-toggle[aria-expanded=true]) .public-navigation {
        position: absolute;
        z-index: 60;
        inset-inline: 0;
        top: 100%;
        display: block;
        max-height: min(75dvh, calc(100dvh - 80px));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 8px clamp(12px, 4vw, 24px) 12px;
        background: var(--header);
        border-top: 1px solid #778b9e;
        box-shadow: var(--shadow-menu);
    }
    .public-header.has-public-menu .public-navigation nav { display: grid; gap: 0; padding: 0; }
    .public-header .public-navigation nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 8px;
        overflow-wrap: anywhere;
    }
    .public-header .public-navigation .language-picker { margin-block: 8px 0; }
    .public-header .public-navigation .language-picker > summary { min-height: 44px; }
    .public-header .public-navigation .language-menu {
        position: static;
        width: 100%;
        max-width: none;
        max-height: none;
        margin-block-start: 8px;
    }
}
.public-header .language-menu a:focus-visible { outline-color: var(--green); outline-offset: -2px; }

/* In a narrow project list the project leads; metadata and actions follow it. */
.project-select-all-label { display: none; }
@media (max-width: 760px) {
    .app-body .workspace .project-list-table .responsive-table thead tr { display: block; }
    .app-body .workspace .project-list-table .responsive-table thead .project-selection {
        display: block;
        width: auto;
        padding: 0 12px;
        border-bottom: 1px solid var(--line);
    }
    .app-body .project-select-all-label { display: inline; margin-inline-start: 8px; font-size: 12px; }
    .app-body .workspace .project-list-table .responsive-table tbody tr {
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: start;
        column-gap: 4px;
    }
    .app-body .workspace .project-list-table .responsive-table tbody tr > :is(th, td) { grid-column: 1 / -1; }
    .app-body .workspace .project-list-table .responsive-table tbody tr > .project-selection {
        display: block;
        grid-column: 1;
    }
    .app-body .workspace .project-list-table .responsive-table tbody tr > th {
        display: block;
        grid-column: 2;
        padding-block: 5px 8px;
    }
    .app-body .project-list-table .project-list-name { font-size: 15px; line-height: 1.35; }
    .app-body .project-list-table th small { font-size: 11px; }
    .app-body .project-list-table :is(th, .project-selection, .project-check-action) .responsive-label { display: none; }
    .app-body .workspace .project-list-table .responsive-table .project-check-action { display: block; }
    .app-body .workspace .project-list-table .responsive-table .project-without-check :is(.project-metric, .project-movement, .project-tops) { display: none; }
    .app-body .project-list-table .project-check-action .btn { margin-top: 4px; }
    .guest-body .auth-shell { width: min(460px, calc(100% - 32px)); margin-block: 20px 40px; }
    .guest-body .auth-panel { padding: 20px; }
    .public-body .service-page { padding-block: 28px 44px; }
    .public-body .service-heading { margin-bottom: 24px; }
    .public-body .service-index nav { gap: 8px 16px; margin-bottom: 12px; }
    .demo-table th:first-child { width: 30%; }
    .demo-table :is(th, td) { padding-inline: 4px; }
    .demo-table thead th:not(:first-child) { text-align: center; font-size: 10px; }
    .demo-table td { text-align: center; }
}
