/* Pages outside the workspace. Loaded after styles.css, which holds the tokens. */
body.page { overflow: auto; font-size: 14px; min-height: 100vh; }
body.page .topbar { position: sticky; top: 0; z-index: 5; height: 52px; padding: 0 clamp(16px, 2.6vw, 40px); background: var(--dg-glass); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); }
.brand { text-decoration: none; color: inherit; }
.mainnav { display: flex; gap: 2px; padding-left: 14px; border-left: 1px solid var(--dg-line); }
.mainnav a { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--dg-radius-pill); color: var(--dg-text-muted); text-decoration: none; font-weight: 500; font-size: 13px; transition: background var(--dg-dur-fast) var(--dg-ease), color var(--dg-dur-fast) var(--dg-ease); }
.mainnav a:hover { color: var(--dg-text); background: var(--dg-surface-3); }
.mainnav a[aria-current] { color: var(--dg-text); background: var(--dg-surface-3); box-shadow: var(--lift); }
a.btn { text-decoration: none; }
.usercard { display: flex; align-items: center; gap: 9px; padding: 3px 10px 3px 4px; border-radius: 999px; text-decoration: none; color: inherit; border: 1px solid transparent; }
.usercard:hover, .usercard[aria-current] { background: var(--dg-surface-3); border-color: var(--dg-line-strong); }
.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--dg-surface-3); border: 1px solid var(--dg-line-strong); font: 600 10.5px var(--dg-font-mono); color: var(--dg-text-soft); }
.who { display: flex; flex-direction: column; line-height: 1.2; font-size: 12px; } .who span { color: var(--dg-text-faint); font-size: 11px; }

#page { max-width: 1320px; margin: 0 auto; padding: 32px clamp(16px, 2.6vw, 40px) 96px; }
#page.narrow { max-width: 920px; }
.eyebrow { font: 600 10.5px var(--dg-font-mono); letter-spacing: var(--dg-eyebrow-track); text-transform: var(--dg-eyebrow-case); color: var(--dg-text-faint); }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--dg-text-muted); text-decoration: none; font-size: 13px; margin-bottom: 14px; }
.crumb:hover { color: var(--dg-text); } .crumb .ico { width: 14px; height: 14px; }
.pagehead { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.pagehead h1 { margin: 0; font-size: clamp(24px, 2.2vw, 30px); font-weight: var(--dg-heading-weight); letter-spacing: var(--dg-heading-track); line-height: 1.1; }
.pagehead .sub { color: var(--dg-text-muted); margin: 6px 0 0; max-width: 62ch; }
.pagehead .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; } .search .ico { position: absolute; left: 10px; top: 9px; color: var(--dg-text-faint); width: 15px; height: 15px; }
.search input, .input, select.input { height: 34px; padding: 0 12px; background: var(--dg-surface); border: 1px solid var(--dg-line); border-radius: var(--dg-radius); min-width: 0; }
.search input { padding-left: 32px; width: 260px; max-width: 100%; }
.search input, select.input { border-radius: var(--dg-radius-pill); }
.search input:focus, .input:focus { border-color: var(--dg-accent); box-shadow: 0 0 0 3px var(--dg-accent-wash); outline: none; }
.input::placeholder, .search input::placeholder { color: var(--dg-text-faint); }
.segc { display: inline-flex; padding: 3px; gap: 2px; background: var(--dg-surface); border: 1px solid var(--dg-line); border-radius: var(--dg-radius-pill); }
.segc button { width: 30px; height: 26px; display: grid; place-items: center; border: 0; border-radius: var(--dg-radius-pill); background: none; color: var(--dg-text-muted); }
.segc button[aria-pressed=true] { background: var(--dg-selected-bg); color: var(--dg-selected-ink); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dg-text-muted); cursor: pointer; }
.switch input { accent-color: var(--dg-accent); margin: 0; }

.tag.ok { color: var(--dg-ok); background: var(--dg-ok-wash); }
.tag.bad { color: var(--dg-danger); background: var(--dg-danger-wash); }
.tag.ex { color: var(--dg-example); background: var(--dg-example-wash); }
.tag.plain { color: var(--dg-text-soft); background: var(--dg-surface-3); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--dg-surface); border: 1px solid var(--dg-line); border-radius: var(--dg-radius-lg); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--lift); transition: border-color .35s var(--dg-ease), transform .35s var(--dg-ease), box-shadow .35s var(--dg-ease); }
a.card:hover { border-color: var(--dg-line-strong); transform: translateY(-2px); box-shadow: var(--dg-shadow-card); }
.card .shot { aspect-ratio: 16 / 10; background: var(--dg-surface-3) center / cover; position: relative; }
.card .shot .tag { position: absolute; left: 10px; top: 10px; background: var(--dg-onmap-bg); color: var(--dg-onmap-ink); }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 16px; letter-spacing: -0.02em; }
.card .place { color: var(--dg-text-muted); font-size: 12.5px; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid var(--dg-line-faint); }
.stats dt { font-size: 11px; color: var(--dg-text-faint); } .stats dd { margin: 2px 0 0; font: 500 13px var(--dg-font-mono); }
.card.new { border-style: dashed; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 32px 20px; min-height: 260px; color: var(--dg-text-muted); box-shadow: none; }
.card.new .ico { width: 26px; height: 26px; color: var(--dg-text-faint); } .card.new b { color: var(--dg-text); font-weight: 600; }

/* panels and tables */
.panel { background: var(--dg-surface); border: 1px solid var(--dg-line); border-radius: var(--dg-radius-lg); box-shadow: var(--lift); }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--dg-line); }
.panel > header h2 { font-size: 14px; } .panel > header .spacer { flex: 1; }
.panel .pad { padding: 18px; }
.panel + .panel { margin-top: 16px; }
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font: 600 10.5px var(--dg-font-mono); letter-spacing: calc(var(--dg-eyebrow-track) * .7); text-transform: var(--dg-eyebrow-case); color: var(--dg-text-faint); padding: 10px 18px; white-space: nowrap; border-bottom: 1px solid var(--dg-line); }
.t td { padding: 12px 18px; border-bottom: 1px solid var(--dg-line-faint); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover { background: var(--dg-surface-2); }
.t .n { font-family: var(--dg-font-mono); text-align: right; white-space: nowrap; } .t th.n { text-align: right; }
.t .main { font-weight: 600; } .t .main small { display: block; font-weight: 400; color: var(--dg-text-muted); font-size: 12px; margin-top: 2px; }
.t .detail { color: var(--dg-text-muted); font-size: 12.5px; max-width: 46ch; }
.t a { color: inherit; text-decoration: none; } .t a:hover { text-decoration: underline; }
.rowthumb { display: flex; align-items: center; gap: 12px; } .rowthumb img { width: 52px; height: 34px; object-fit: cover; border-radius: var(--dg-radius-sm); }
.meter { height: 4px; border-radius: 2px; background: var(--dg-surface-3); overflow: hidden; margin-top: 6px; width: 160px; }
.meter i { display: block; height: 100%; background: repeating-linear-gradient(135deg, var(--dg-warn) 0 6px, var(--dg-warn-line) 6px 12px); }
.empty { padding: 48px 24px; text-align: center; color: var(--dg-text-muted); }
.empty b { display: block; color: var(--dg-text); font-size: 15px; margin-bottom: 6px; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.kv.wide { grid-template-columns: auto 1fr; gap: 10px 24px; } .kv.wide dd { text-align: left; }
.hero { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: center; margin-bottom: 24px; }
.hero img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--dg-radius-lg); border: 1px solid var(--dg-line); }
.bigstats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 18px; }
.bigstats div b { display: block; font: 600 22px var(--dg-font-mono); letter-spacing: -0.02em; } .bigstats div span { font-size: 12px; color: var(--dg-text-muted); }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--dg-radius); border: 1px solid var(--dg-line-strong); background: var(--dg-surface-2); color: var(--dg-text-soft); font-size: 13px; line-height: 1.5; }
.notice .ico { margin-top: 2px; color: var(--dg-text-muted); } .notice b { color: var(--dg-text); }
.notice.warn { border-color: var(--dg-warn-line); background: var(--dg-warn-wash); } .notice.warn .ico { color: var(--dg-warn); }
.notice.bad { border-color: var(--dg-danger-line); background: var(--dg-danger-wash); } .notice.bad .ico { color: var(--dg-danger); }
.notice.ok { border-color: var(--dg-ok-line); background: var(--dg-ok-wash); } .notice.ok .ico { color: var(--dg-ok); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--dg-line); margin-bottom: 20px; }
.tabs button { height: 38px; padding: 0 14px; border: 0; background: none; color: var(--dg-text-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--dg-text); } .tabs button[aria-selected=true] { color: var(--dg-text); border-bottom-color: var(--dg-accent); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photos figure { margin: 0; } .photos img, .photos .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--dg-radius); display: block; background: var(--dg-surface-3); }
.photos figcaption { font: 11px var(--dg-font-mono); color: var(--dg-text-faint); margin-top: 5px; }

/* upload */
.drop { border: 1.5px dashed var(--dg-line-strong); border-radius: var(--dg-radius-lg); padding: 44px 24px; text-align: center; background: var(--dg-surface); color: var(--dg-text-muted); transition: border-color var(--dg-dur-fast), background var(--dg-dur-fast); }
.drop.over { border-color: var(--dg-accent); background: var(--dg-accent-wash); }
.drop .ico { width: 30px; height: 30px; color: var(--dg-text-faint); } .drop b { display: block; color: var(--dg-text); font-size: 16px; margin: 10px 0 4px; }
.drop .btn { margin-top: 16px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--dg-text-muted); } .form .input { width: 100%; }
.form label.btn { flex-direction: row; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--dg-text-soft); } .checks li b { color: var(--dg-text); font-family: var(--dg-font-mono); font-weight: 500; }
.checks .ico { margin-top: 2px; } .checks .pass .ico { color: var(--dg-ok); } .checks .fail .ico { color: var(--dg-danger); } .checks .info .ico { color: var(--dg-text-faint); } .checks .hold .ico { color: var(--dg-warn); }
.stick { position: sticky; top: 68px; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan { background: var(--dg-surface-2); border: 1px solid var(--dg-line); border-radius: var(--dg-radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.plan.current { border-color: var(--dg-accent-line); background: var(--dg-accent-wash); }
.plan .price { font: 600 26px var(--dg-font-mono); letter-spacing: -0.02em; } .plan .price small { font-size: 12px; color: var(--dg-text-muted); font-weight: 400; }
.plan p { margin: 0; color: var(--dg-text-muted); font-size: 12.5px; line-height: 1.5; min-height: 3em; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--dg-text-soft); flex: 1; }
.plan li { display: flex; gap: 8px; } .plan li .ico { width: 14px; height: 14px; color: var(--dg-text-faint); margin-top: 2px; }
.setgrid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.sidenav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.sidenav a { padding: 8px 12px; border-radius: var(--dg-radius-pill); color: var(--dg-text-muted); text-decoration: none; font-size: 13px; } .sidenav a:hover { color: var(--dg-text); background: var(--dg-surface-2); }
section.set { scroll-margin-top: 76px; margin-bottom: 16px; }
pre.code { margin: 0; padding: 14px 16px; background: var(--dg-bg); border: 1px solid var(--dg-line); border-radius: var(--dg-radius); font: 12px/1.6 var(--dg-font-mono); color: var(--dg-text-soft); overflow-x: auto; }

/* ask */
.ask { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.asked { display: flex; flex-direction: column; } .asked button { text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--dg-line-faint); background: none; color: var(--dg-text-soft); font-size: 13px; line-height: 1.4; }
.asked button:hover { background: var(--dg-surface-2); } .asked button[aria-pressed=true] { background: var(--dg-surface-3); color: var(--dg-text); }
.q { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 14px; }
.a { color: var(--dg-text-soft); line-height: 1.62; max-width: 66ch; margin: 0 0 16px; } .a b { color: var(--dg-text); font-family: var(--dg-font-mono); font-weight: 500; }
.evidence { border: 1px solid var(--dg-line); border-radius: var(--dg-radius); background: var(--dg-bg); }
.evidence h4 { margin: 0; padding: 10px 14px; font: 600 10.5px var(--dg-font-mono); letter-spacing: var(--dg-eyebrow-track); text-transform: var(--dg-eyebrow-case); color: var(--dg-text-faint); border-bottom: 1px solid var(--dg-line); }
.evidence li { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--dg-line-faint); font-size: 12.5px; align-items: baseline; } .evidence ul { list-style: none; margin: 0; padding: 0; } .evidence li:last-child { border: 0; }
.evidence code { font: 12px var(--dg-font-mono); color: var(--dg-amber); white-space: nowrap; } .evidence li span { color: var(--dg-text-muted); flex: 1; } .evidence li a { color: var(--dg-text); }
.askbar { display: flex; gap: 8px; margin-top: 18px; } .askbar .input { flex: 1; height: 40px; }

@media (max-width: 900px) {
  .cols, .hero, .setgrid, .ask { grid-template-columns: 1fr; }
  .sidenav { position: static; flex-direction: row; overflow-x: auto; } .stick { position: static; }
  .form { grid-template-columns: 1fr; }
  .mainnav a span, .top-actions .btn span, .who { display: none; }
  body.page .proto-chip { display: none; }
}

.mono, .num, .t .n, .kv dd, .stats dd, .bigstats b, .plan .price { font-variant-numeric: tabular-nums; }

/* Loading and empty states for pages that read from the service. */
.skel .bar { height: 12px; border-radius: 6px; background: var(--dg-surface-3); margin: 14px 0; width: 70%; animation: skel 1.2s ease-in-out infinite; } .skel .bar.short { width: 40%; }
.skel.panel { padding: 18px 20px; } .card.skel .shot, .hero.skel .shot { background: var(--dg-surface-3); animation: skel 1.2s ease-in-out infinite; }
.hero.skel { display: grid; grid-template-columns: 320px 1fr; gap: 24px; } .hero.skel .shot { aspect-ratio: 16 / 10; border-radius: var(--dg-radius); }
@keyframes skel { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.shot[data-empty], .hero .shot[data-empty] { background: repeating-linear-gradient(135deg, var(--dg-surface-3) 0 10px, var(--dg-surface) 10px 20px); display: grid; place-items: center; }
.hero .shot[data-empty] { aspect-ratio: 16 / 10; border-radius: var(--dg-radius); }
.noshot { font-size: 12px; color: var(--dg-text-faint); background: var(--dg-surface); padding: 4px 8px; border-radius: var(--dg-radius-sm); }
.rowthumb .ph { width: 52px; height: 34px; border-radius: var(--dg-radius-sm); background: repeating-linear-gradient(135deg, var(--dg-surface-3) 0 6px, var(--dg-surface) 6px 12px); flex: none; }
.t td.empty { text-align: center; color: var(--dg-text-muted); padding: 28px; }
.btn.ghost.small .ico { width: 15px; height: 15px; }
details.prev { border-top: 1px solid var(--dg-line); padding: 10px 0; } details.prev summary { cursor: pointer; font-weight: 500; color: var(--dg-text-soft); } details.prev > :not(summary) { margin-top: 12px; }
