/* B2B Greenland Exchange · components v1 (owner: Claude). Uses tokens.css only. */

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; color: var(--ink); background: var(--ice); -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--ice); }
h1, h2, h3, p { margin: 0; }
h1 { font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
h2 { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: var(--text-md); font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
small, .small { font-size: var(--text-sm); }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.data { font-family: var(--font-data); font-size: 0.92em; }
.eyebrow { font-family: var(--font-data); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.right { text-align: right; }
.strike { text-decoration: line-through; color: var(--ink-3); }
.tip { border-bottom: 1px dotted currentColor; cursor: help; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .btn, .nav, .cell { transition: background-color 0.12s, border-color 0.12s, color 0.12s; } }

/* ---------- frame ---------- */
.topbar { display: flex; align-items: stretch; gap: var(--s5); background: var(--deep); color: var(--on-deep); padding: 0 max(16px, var(--s6)); min-height: 60px; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 17px; white-space: nowrap; letter-spacing: -0.01em; text-decoration: none; }
.brand-tag { font-family: var(--font-data); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; border: 1px solid var(--on-deep-muted); border-radius: var(--r-sm); padding: 1px 5px; color: var(--on-deep-muted); }
.topnav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; }
.nav { border: 0; border-block: 3px solid transparent; background: none; color: var(--on-deep-muted); padding: 0 13px; white-space: nowrap; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.nav:hover { color: #fff; }
.nav.on { color: #fff; border-bottom-color: #fff; }
.nav .new { width: 6px; height: 6px; border-radius: 50%; background: var(--house-yellow); }
.topright { display: flex; align-items: center; gap: var(--s4); font-size: var(--text-sm); white-space: nowrap; }
.topright b { font-weight: 600; }
.demo-flag { font-family: var(--font-data); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; background: var(--house-yellow); color: var(--deep); padding: 2px 7px; border-radius: var(--r-sm); }
.view { padding: var(--s6) max(16px, var(--s6)) var(--s7); max-width: 1560px; margin: 0 auto; }
.head { display: flex; justify-content: space-between; gap: var(--s5); align-items: flex-end; flex-wrap: wrap; margin-bottom: var(--s5); }
.head > div:first-child { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.head p { color: var(--ink-2); max-width: 68ch; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- controls ---------- */
.btn { border: 1px solid var(--rule-strong); background: var(--paper); border-radius: var(--r-md); padding: 8px 14px; font-weight: 500; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); background: var(--ice); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-hover); font-weight: 600; }
.btn.sm { padding: 4px 10px; min-height: 32px; font-size: var(--text-sm); }
.btn:disabled { background: var(--ice-2); border-color: var(--ice-2); color: var(--ink-3); cursor: not-allowed; }
input, select { border: 1px solid var(--rule-strong); border-radius: var(--r-md); padding: 8px 10px; background: var(--paper); min-height: 40px; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235c6d7e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
input:hover, select:hover { border-color: var(--ink-3); }
input[type="number"] { width: 92px; font-variant-numeric: tabular-nums; }
input[type="checkbox"] { min-height: 0; width: 17px; height: 17px; accent-color: var(--blue); }
.seg { display: inline-flex; }
.seg button { border: 1px solid var(--rule-strong); background: var(--paper); padding: 8px 13px; min-height: 40px; margin-left: -1px; font-weight: 500; }
.seg button:first-child { border-radius: var(--r-md) 0 0 var(--r-md); margin-left: 0; }
.seg button:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.seg button:hover { background: var(--ice); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; position: relative; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: var(--text-xs); font-family: var(--font-data); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.field > * { font-family: var(--font-body); font-size: var(--text-md); letter-spacing: 0; text-transform: none; color: var(--ink); }
.check { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: var(--s4); }

/* icon-led controls */
.ic { flex: none; vertical-align: -3px; }
.btn.icon { padding: 8px 11px; }
.grow { flex: 1; }
.pick { display: inline-flex; align-items: center; gap: 8px; height: 40px; border: 1px solid var(--rule-strong); border-radius: var(--r-md); background: var(--paper); padding-left: 12px; color: var(--ink-3); }
.pick:hover { border-color: var(--ink-3); }
.pick select { border: 0; background-color: transparent; color: var(--ink); padding-left: 0; min-height: 0; height: 38px; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule-strong); background: var(--paper); border-radius: 999px; padding: 0 13px; min-height: 40px; font-weight: 500; white-space: nowrap; }
.chip .gable { margin-right: 0; }
.chip:hover { background: var(--ice); border-color: var(--ink-3); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--rule-strong); border-radius: var(--r-md); background: var(--paper); padding-left: 10px; color: var(--ink-3); }
.stepper button { border: 0; background: none; min-height: 38px; padding: 0 9px; color: var(--ink); display: inline-flex; align-items: center; }
.stepper button:hover { background: var(--ice); }
.stepper input { border: 0; width: 44px; min-height: 38px; padding: 0; text-align: center; font-weight: 600; }
.seg button { display: inline-flex; align-items: center; gap: 6px; }
.thbtn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--on-deep); font: inherit; font-size: var(--text-sm); padding: 2px 0; }
.thbtn:hover { color: #fff; text-decoration: underline; }

/* ---------- surfaces and labels ---------- */
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s5); }
.tag { display: inline-flex; align-items: center; font-family: var(--font-data); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-sm); background: var(--ice-2); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn, .tag.demo { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--blue-soft); color: var(--blue-hover); }
.note { display: block; font-size: var(--text-sm); padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--rule); background: var(--ice); }
.note.ok { background: var(--ok-soft); border-color: #bcdccb; color: var(--ok); }
.note.warn { background: var(--warn-soft); border-color: #ecd9a8; color: var(--warn); }
.note.bad { background: var(--bad-soft); border-color: #f0c4c0; color: var(--bad); }
.gable { display: inline-block; width: 10px; height: 12px; margin-right: 8px; vertical-align: -1px; background: var(--ink-3); clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); }
.gable[data-type="Boat"] { background: var(--house-blue); }
.gable[data-type="Hike"] { background: var(--house-green); }
.gable[data-type="Winter"] { background: var(--house-red); }
.gable[data-type="Stay"] { background: var(--house-yellow); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px var(--s4); margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sum { display: flex; justify-content: space-between; gap: var(--s4); padding: 8px 0; border-bottom: 1px solid var(--rule); }
.sum:last-child { border: 0; font-weight: 600; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: var(--s5); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.tabs button.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
table.t { width: 100%; border-collapse: collapse; }
.t th { font-family: var(--font-data); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); text-align: left; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--rule-strong); }
.t th.right { text-align: right; }
.t td { padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }

/* ---------- lists: today, requests, lots ---------- */
.list, .section-title { max-width: 1080px; }
.list { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-lg); }
.line { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3) var(--s4); align-items: center; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--rule); }
.line:last-child { border-bottom: 0; }
.line .when { font-family: var(--font-data); font-size: var(--text-xs); color: var(--ink-3); min-width: 84px; }
.line h3 { font-size: 16px; }
.line p { color: var(--ink-2); font-size: var(--text-sm); }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: var(--s6) 0 var(--s3); }
.section-title:first-of-type { margin-top: 0; }
.count { font-family: var(--font-data); font-size: var(--text-sm); color: var(--ink-3); }
.lot { display: grid; grid-template-columns: 1fr auto; gap: 8px var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--rule); }
.lot:first-child { padding-top: 0; }
.lot:last-child { border: 0; padding-bottom: 0; }
.lot p { color: var(--ink-2); }
.lot .amount { font-family: var(--font-data); font-size: 19px; font-weight: 600; }

/* ---------- sign-in ---------- */
.signin { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr); min-height: calc(100vh - 44px); background: var(--paper); }
.chart { position: relative; overflow: hidden; background: var(--deep); color: var(--on-deep); padding: var(--s7) max(24px, 6vw); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s7); }
.chart .soundings { position: absolute; inset: 0; font-family: var(--font-data); font-size: 12px; color: var(--deep-2); pointer-events: none; }
.chart .soundings span { position: absolute; }
.chart > * { position: relative; }
.chart h1 { font-size: clamp(34px, 4.6vw, 60px); color: #fff; max-width: 14ch; }
.chart p { color: var(--on-deep-muted); max-width: 46ch; margin-top: var(--s4); font-size: 17px; }
.chart .ops { font-family: var(--font-data); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-deep-muted); }
.signin form { padding: var(--s7) max(24px, 5vw); display: flex; flex-direction: column; gap: var(--s4); justify-content: center; max-width: 520px; }
.signin form input { width: 100%; }
.quick { display: grid; gap: 8px; margin-top: var(--s3); }
.quick button { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); text-align: left; border: 1px solid var(--rule); background: var(--paper); border-radius: var(--r-md); padding: 10px 14px; }
.quick button:hover { border-color: var(--blue); background: var(--blue-soft); }

/* ---------- booking: steps and next step ---------- */
.steps { display: flex; gap: 0; list-style: none; margin: 0 0 var(--s4); padding: 0; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 500; padding-right: 14px; }
.steps li + li::before { content: ""; width: 36px; height: 2px; background: var(--rule-strong); margin-right: 6px; }
.steps li span { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--rule-strong); font-family: var(--font-data); font-size: 12px; background: var(--paper); }
.steps li.done { color: var(--ink); }
.steps li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.done + li::before { background: var(--ok); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now span { border-color: var(--blue); color: var(--blue); }
.next { display: flex; justify-content: space-between; align-items: center; gap: var(--s5); flex-wrap: wrap; background: var(--blue-soft); border: 1px solid var(--blue); border-radius: var(--r-lg); padding: var(--s5); margin-bottom: var(--s4); }
.next > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.next p { color: var(--ink-2); max-width: 62ch; }
.next.wait { background: var(--paper); border-color: var(--rule); }
.next.ok { background: var(--ok-soft); border-color: #bcdccb; }
