/* The Go pages of Studio, drawn the way the apps draw the Blue prototype: the
   values are tokens.css, generated from the mobile design tokens (D11), and
   nothing here names a colour of its own. */
@import url("https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap");

:root {
  --font: "Schibsted Grotesk", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Schibsted Grotesk", system-ui, sans-serif;
  --radius-chip: 3px;
  --radius-ctl: 14px;
  --radius-lg: 26px;
  color-scheme: light dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--surface-page); color: var(--text-primary);
  font: var(--type-body-font-weight) var(--type-body-font-size) / var(--type-body-line-height) var(--font);
  letter-spacing: var(--type-body-letter-spacing);
  -webkit-font-smoothing: antialiased;
}
[lang="ar"], .ar { font-family: var(--font-ar); direction: rtl; }
a { color: var(--action-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5);
  background: var(--surface-card); border-bottom: 1px solid var(--border-row-divider);
  position: sticky; top: 0; z-index: 2;
}
.mark { width: 28px; height: 28px; flex: none; background: url("/static/favicon.svg") center / contain no-repeat; }
.top .entity { display: flex; flex-direction: column; min-width: 0; }
.top .entity b { font: var(--type-headline-font-weight) var(--type-headline-font-size) / var(--type-headline-line-height) var(--font); letter-spacing: var(--type-headline-letter-spacing); }
.top nav { margin-inline-start: auto; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.top nav a {
  padding: 10px 14px; border-radius: 22px; border: 1px solid var(--action-ghost-border); color: var(--text-primary);
  font-size: 13px; min-height: 44px; display: inline-flex; align-items: center;
}
.top nav a[aria-current="page"] { background: var(--surface-chip-selected); border-color: var(--border-chip-selected); color: var(--text-chip-selected); }
.top nav a:hover { text-decoration: none; background: var(--surface-field); }
.top .name { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.top .switch { font-size: var(--type-caption-font-size); font-weight: 600; }
.top .who { color: var(--text-secondary); font-size: var(--type-caption-font-size); }

main { max-width: 960px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-8); }
h1 { font: var(--type-title-font-weight) var(--type-title-font-size) / var(--type-title-line-height) var(--font); letter-spacing: var(--type-title-letter-spacing); margin: var(--space-2) 0 var(--space-4); }
h2 { font: var(--type-headline-font-weight) var(--type-headline-font-size) / var(--type-headline-line-height) var(--font); margin: 0 0 var(--space-3); }
.overline {
  font: var(--type-overline-font-weight) 9.5px / 14px var(--font); letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--text-tertiary); margin: 0 0 var(--space-2);
}
p.lede { color: var(--text-secondary); margin: 0 0 var(--space-5); }

.card {
  background: var(--surface-card); border: 1px solid var(--border-row-divider); border-radius: 20px;
  padding: var(--space-5); margin: 0 0 var(--space-4);
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.stat b { display: block; font: 600 30px / 36px var(--font); letter-spacing: -0.6px; }
.stat span { color: var(--text-secondary); font-size: var(--type-caption-font-size); }

/* Trust, drawn the app's way: government and business told apart by shape and word. */
.trust { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.trust.gov { color: var(--trust-gov); background: var(--trust-gov-soft); border-radius: var(--radius-pill); }
.trust.biz { color: var(--trust-biz); background: var(--trust-biz-soft); border-radius: var(--radius-chip); }
.trust .dot { width: 8px; height: 8px; background: currentColor; }
.trust.gov .dot { border-radius: var(--radius-pill); }
.trust.biz .dot { border-radius: 2px; }
.verified { color: var(--status-ok); font-weight: 600; }
.unverified { color: var(--status-danger); font-weight: 600; }

form.stack { display: grid; gap: var(--space-4); }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: var(--type-caption-font-size); color: var(--text-secondary); font-weight: 600; }
.field .optional { font-weight: 400; color: var(--text-tertiary); }
.field label.check { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; font-size: var(--type-callout-font-size); font-weight: 400; color: var(--text-primary); cursor: pointer; }
.field label.check input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--action-primary); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text-primary); background: var(--surface-field);
  border: 1px solid transparent; border-radius: var(--radius-ctl); padding: 11px 14px; min-height: 44px; width: 100%;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--border-field-accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
.filters { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: var(--space-4); align-items: end; margin: 0 0 var(--space-4); }
.filters > :nth-last-child(2) { grid-column: 1 / span 2; }
.filters > :last-child { justify-self: end; }
@media (max-width: 760px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .resident-filter, .filters > :nth-last-child(2) { grid-column: 1 / -1; }
}
.joined { display: flex; gap: 2px; min-width: 0; }
.field .joined select { flex: none; width: auto; border-start-end-radius: 0; border-end-end-radius: 0; }
.field .joined input { flex: 1; min-width: 0; border-start-start-radius: 0; border-end-start-radius: 0; }
.table-scroll { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.resident { display: inline-flex; align-items: baseline; gap: 6px; }
.resident .id-type { color: var(--text-secondary); font-size: var(--type-caption-font-size); }
.crumb { font-size: var(--type-caption-font-size); color: var(--text-tertiary); margin: 0; }
.notice-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin: var(--space-2) 0 var(--space-4); }
.notice-title { min-width: 0; }
.notice-head h1 { margin: 0; text-transform: capitalize; }
.notice-head h1 .to { text-transform: none; font-weight: 400; color: var(--text-secondary); }
.notice-head h1 .resident .id-type { font-size: inherit; }
.notice-head h1 .resident .mono { font-size: .8em; color: var(--text-primary); }
.notice-head .id { color: var(--text-tertiary); margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
.notice-state { padding-top: 6px; }
.notice-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-4); align-items: start; margin-top: var(--space-4); }
.notice-grid > .card { margin: 0; }
@media (max-width: 760px) { .notice-grid { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; font-size: var(--type-callout-font-size); }
.facts dt, .facts dd { padding: 10px 0; border-bottom: 1px solid var(--border-row-divider); margin: 0; }
.facts dt { font: var(--type-overline-font-weight) 9.5px / 20px var(--font); letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-tertiary); padding-inline-end: var(--space-5); }
.facts dd { overflow-wrap: anywhere; }
.facts > :nth-last-child(-n+2) { border-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { position: relative; display: flex; justify-content: space-between; gap: var(--space-3); padding: 8px 0 8px 22px; font-size: var(--type-callout-font-size); }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--action-primary); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 26px; bottom: -8px; width: 1px; background: var(--border-row-divider); }
.timeline .step { text-transform: capitalize; font-weight: 600; }
.timeline time { color: var(--text-secondary); white-space: nowrap; }
main > .notice-box { margin: 0 0 var(--space-4); }
.hint { color: var(--text-tertiary); font-size: var(--type-caption-font-size); }

button, .button {
  font: 700 14px / 20px var(--font); color: var(--text-on-accent); background: var(--action-primary);
  border: 0; border-radius: 28px; padding: 12px 20px; min-height: 44px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:hover, .button:hover { background: var(--action-primary-pressed); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost, .button.ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--action-ghost-border); }
button.ghost:hover, .button.ghost:hover { background: var(--surface-field); }

.notice-box { border: 1px solid var(--border-default); border-radius: 12px; padding: 11px 13px; font-size: 13px; line-height: 18.85px; display: flex; gap: 9px; }
.notice-box.danger { color: var(--status-danger); background: var(--status-danger-bg); border-color: transparent; }
.notice-box.ok { color: var(--status-ok); background: var(--status-ok-bg); border-color: var(--status-ok-border); }
.notice-box.warn { color: var(--status-warn); background: var(--status-warn-bg); border-color: transparent; }
.notice-box.info { color: var(--status-info); background: var(--status-info-bg); border-color: transparent; }

table { width: 100%; border-collapse: collapse; font-size: var(--type-callout-font-size); }
th { text-align: start; font: var(--type-overline-font-weight) 9.5px / 14px var(--font); letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-tertiary); padding: 8px 10px; border-bottom: 1px solid var(--border-row-divider); }
td { padding: 10px; border-bottom: 1px solid var(--border-row-divider); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.chip { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; background: var(--surface-field); color: var(--text-secondary); }
.chip.ok { background: var(--status-ok-bg); color: var(--status-ok); }
.chip.warn { background: var(--status-warn-bg); color: var(--status-warn); }
.chip.danger { background: var(--status-danger-bg); color: var(--status-danger); }
.chip.info { background: var(--status-info-bg); color: var(--status-info); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.previews { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 640px) { .previews { grid-template-columns: 1fr; } }
.preview-pane { display: grid; gap: var(--space-2); align-content: start; min-width: 0; }
.preview-pane > .hint { margin: 0; }
.preview { border: 1px solid var(--border-bubble-in); background: var(--surface-bubble-in); border-radius: 20px; padding: var(--space-4); max-width: 420px; }
.preview { display: grid; gap: 6px; }
.preview .title { font-weight: 600; }
.preview .code { font: 700 22px / 28px ui-monospace, monospace; letter-spacing: 3px; margin: 8px 0; }
.preview.ar .code { text-align: right; }
.login { max-width: 440px; margin: 10vh auto; text-align: center; }
.login .mark { width: 56px; height: 56px; margin: 0 auto var(--space-5); }
.disabled-note { color: var(--text-tertiary); }
.chooser { max-width: 560px; margin: 6vh auto 0; }
.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.choice-button {
  width: 100%; display: flex; align-items: center; gap: var(--space-4); justify-content: flex-start; text-align: start;
  font: inherit; font-weight: 400; color: var(--text-primary); background: var(--surface-card);
  border: 1px solid var(--border-row-divider); border-radius: 20px; padding: var(--space-4);
}
.choice-button:hover { background: var(--surface-card); border-color: var(--border-field-accent); }
.choice-button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.choice-button .tile {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  font: 700 20px / 1 var(--font); color: var(--text-on-accent);
}
.choice-button .tile.gov { border-radius: var(--radius-pill); background: var(--trust-gov); }
.choice-button .tile.biz { border-radius: 12px; background: var(--trust-biz); }
.choice-button .names { display: grid; gap: 2px; min-width: 0; flex: 1; }
.choice-button .names b { font-size: var(--type-headline-font-size); line-height: var(--type-headline-line-height); overflow-wrap: anywhere; }
.choice-button .names .ar { color: var(--text-secondary); text-align: left; }
.choice-button .marks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-1); font-size: 12px; }
.choice-button .marks .trust { padding: 2px 8px; }
.choice-button .chevron { width: 10px; height: 10px; flex: none; border: solid var(--text-tertiary); border-width: 2px 2px 0 0; transform: rotate(45deg); margin-inline-end: var(--space-1); }
.choice-button:hover .chevron { border-color: var(--action-primary); }
code.key { word-break: break-all; }
