/* Hindsite's own identity, at portal sizes.
   ---------------------------------------------------------------------------
   This used to carry the app's palette, on the rule that "the portal wears the
   same clothes as the app: one product from upload to doorway". That rule was
   wrong, and it took a second customer to see why: the *app* is white-labelled.
   It wears Kolmanskop's Gypsum and Basalt for Kolmanskop's visitors, and some
   other estate's colours for theirs. The portal is not white-labelled — it is
   the tool every customer signs in to, and dressing it in whichever tour
   happens to be configured would show one business another's identity.

   So the portal wears Hindsite's, matching hindsite.mobi: an editorial
   Didone over a cool grey ground, hairline rules instead of boxes, brass for
   anything that acts, and square corners throughout. The marketing site and the
   portal are one company; the app belongs to the customer.

   The scale below is the site's system at application sizes. A marketing hero
   is 5rem; a page where somebody uploads twelve photographs on a phone is not.
   --------------------------------------------------------------------------- */
/* The site's two faces, served from beside this file. One woff2 per script
   subset rather than one per weight: Google ships both as variable fonts, so a
   single file carries every weight a page uses. Playfair sits behind the local
   Didots in --didone, deliberately: a device that owns a real Didot should use
   it, and Playfair is what every other device now gets instead of falling all
   the way through to Georgia — two faces on the site and a third in the portal
   was exactly the split the identity above exists to prevent. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/static/fonts/playfair-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/static/fonts/playfair-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  --ground: #E7E9EA;
  --surface: #F1F2F2;
  --surface-2: #D8DCDD;
  --ink: #16191C;
  --ink-2: #5A6366;
  --rule: #C6CBCC;
  --accent: #91753C;
  --accent-2: #6E5828;

  /* Kept from the app's palette, because these say the same thing in both and a
     second vocabulary for "this went wrong" helps nobody. Never bright red. */
  --success: #556346;
  --error: #7A3125;

  --didone: 'Didot', 'Bodoni 72', 'Playfair Display', 'Hoefler Text', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --measure: 62ch;
  --shell-max: 1240px;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  /* Square. Plaster meets plaster — the same instinct as the app's radius of 2,
     carried to its end. Nothing here is rounded and nothing casts a shadow. */
  --radius: 0;

  /* An agent uploads standing in front of the picture on their wall, one-handed,
     often outdoors. Targets stay generous whatever the type does. */
  --touch-min: 48px;
  --button-height: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #101315;
    --surface: #181C1E;
    --surface-2: #222829;
    --ink: #E6E9E9;
    --ink-2: #98A2A4;
    --rule: #272D30;
    --accent: #C6A45E;
    --accent-2: #D8BC80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The redesign's shell: one measure for every page, the same 1240px the site's
   sections use. The narrow 48rem column this replaces lived on `body`, which
   meant the header could never run wider than the text it sat over. */
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-7) var(--gutter) var(--space-8);
}

/* -------------------------------------------------------------- the chrome */

.app-header {
  border-bottom: 1px solid var(--rule);
  background: var(--ground);
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-2) 22px;
  flex-wrap: wrap;
  min-height: 68px;
}
.app-header .wordmark { color: var(--ink); text-decoration: none; }
.header-divider { width: 1px; height: 28px; background: var(--rule); }

/* The business as eyebrow, the tour under it: every page is about a named
   thing, not only home. */
.tour-lockup { display: flex; flex-direction: column; gap: 1px; }
.lockup-business {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.lockup-tour { font-size: 0.875rem; font-weight: 500; }

.app-nav {
  display: flex;
  gap: var(--space-2) 22px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: var(--space-2);
  border: 0;
  padding: 0;
  margin-bottom: 0;
}
.app-nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.app-nav a:hover { color: var(--accent-2); }

/* The review count, set as the site sets a numeral: Didone, tabular, on brass. */
.nav-badge {
  font-family: var(--didone);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ground);
  background: var(--accent);
  padding: 1px 7px;
}

.viewer-line {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  flex-wrap: wrap;
}
.viewer-name { font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }

/* Signing out stays a POST — a link somebody else can put in a page is not a
   decision — but wears the design's quiet outline. */
.ghost-button, .sign-out .ghost-button {
  display: inline-block;
  width: auto;
  min-height: 0;
  padding: 9px 14px;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}
.ghost-button:hover { color: var(--accent-2); border-color: var(--accent); }

/* --------------------------------------------------------- the sign-in split */

/* Full-bleed: the one page with no header runs edge to edge, copy left and the
   product's own photograph right. */
.shell.signin-split {
  max-width: none;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  min-height: 100vh;
}
.signin-copy {
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
}
.signin-masthead { display: flex; align-items: baseline; gap: var(--space-4); }
.masthead-address {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.signin-body { max-width: 52ch; padding: var(--space-8) 0; margin: auto 0; }
.signin-body h1 { font-size: clamp(2.6rem, 6vw, 4rem); letter-spacing: -0.03em; }
.lead { font-size: 1.1rem; line-height: 1.55; max-width: 46ch; }

/* The design's inline button: brass, auto width, 56px — against the full-width
   block every form keeps. Doubled class rather than moved below the button
   rules: this file's order is by section, not a specificity contest, and a
   selector that wins by weight keeps winning when a section moves. */
button.button-inline, .button.button-inline {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 56px;
  padding: 0 28px;
}

.footer-crosslink {
  display: flex;
  gap: var(--space-6);
  align-items: baseline;
  border-top: 1px solid var(--rule);
  padding-top: var(--space-4);
  margin-top: auto;
}

.photo-panel { position: relative; background: var(--ink); overflow: hidden; }
.photo-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 25, 28, 0.15) 0%, rgba(22, 25, 28, 0.75) 100%);
}
.photo-caption { position: absolute; left: 40px; right: 40px; bottom: 40px; }
.photo-line {
  font-family: var(--didone);
  font-size: 1.75rem;
  line-height: 1.15;
  color: #F1F2F2;
  margin: 0 0 var(--space-3);
  max-width: 24ch;
}
.photo-credit { font-size: 0.8rem; letter-spacing: 0.02em; color: #98A2A4; margin: 0; }

/* ------------------------------------------------------ the split and rows */

/* The redesign's page shape: content left, a quiet aside right. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-8);
  align-items: start;
}

/* Ruled table rows, the site's manner: no boxes, the rules organise. Each
   screen names its own columns with a modifier beside .table-grid. */
.table-grid {
  display: grid;
  gap: var(--space-5);
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.table-grid.table-head { padding: 0 0 var(--space-2); border-bottom: 2px solid var(--ink); }
.table-grid .eyebrow { margin-bottom: var(--space-1); }
.places-grid { grid-template-columns: minmax(0, 1fr) 120px 150px; }
.cell-name { font-family: var(--didone); font-size: 1.5rem; line-height: 1.2; margin: 0; }

/* Counts as the site sets numerals: Didone, tabular, bare — the column heading
   says what they count. Muted at zero, so an empty room asks rather than shouts. */
.stat-numeral {
  font-family: var(--didone);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums lining-nums;
  margin: 0;
}
.stat-numeral.small { font-size: 1.1rem; }

.button-pair { display: flex; gap: var(--space-4); flex-wrap: wrap; margin: var(--space-7) 0 var(--space-4); }

/* The boxed aside. A new class rather than a bent .row: boxes stay rare, and
   this is the one the design draws. */
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: var(--space-6);
}
.ledger { margin: var(--space-4) 0; }
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}

/* Role chips: solid brass for whoever holds the tour, outlined for an agent. */
.chip-solid, .chip-outline {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 10px;
  white-space: nowrap;
}
.chip-solid { background: var(--accent); color: var(--ground); }
.chip-outline { border: 1px solid var(--accent); color: var(--accent-2); }

.roster-grid { grid-template-columns: minmax(0, 1fr) auto; }
.panel-heading { margin-top: 0; }
.submit-line { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-6); }
.submit-line .secondary { max-width: 34ch; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .places-grid { grid-template-columns: minmax(0, 1fr) 64px; }
  .places-grid .tertiary { grid-column: 1 / -1; }
}

/* One column on a phone: the photograph gives way to the thing being signed
   into. The same breakpoint every split below uses. */
@media (max-width: 900px) {
  .shell.signin-split { grid-template-columns: 1fr; min-height: 0; }
  .photo-panel { display: none; }
  .signin-copy { padding: var(--space-6) var(--gutter); }
}

h1 {
  font-family: var(--didone);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
  max-width: 20ch;
}

h2 {
  font-family: var(--didone);
  font-weight: 400;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: var(--space-7) 0 var(--space-3);
  text-wrap: balance;
}

h3 { font-family: var(--didone); font-weight: 400; font-size: 1.3rem; line-height: 1.25; margin: 0; }

p { margin: 0 0 var(--space-4); max-width: var(--measure); }

a { color: var(--accent-2); text-underline-offset: 3px; }
a:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

/* Tracked uppercase, brass. The site calls it .label; the templates have always
   called it .eyebrow. Both, rather than a rename that touches every page. */
.eyebrow, .label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--space-2);
}

.muted     { color: var(--ink-2); }
.secondary { font-size: 0.94rem; }
.caption   { font-size: 0.8rem; letter-spacing: 0.02em; }

/* Rules divide; boxes are rare. */
.row {
  border-top: 1px solid var(--rule);
  padding: var(--space-4) 0;
}

label { display: block; margin-bottom: var(--space-2); font-weight: 500; }

input[type=text], input[type=number], input[type=password], select, textarea {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-3);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

textarea { min-height: 180px; resize: vertical; }
input[type=file] { font-size: 0.94rem; }
.field { margin-bottom: var(--space-5); }

/* One primary action per screen. Brass, square, tracked. */
button, .button {
  display: block;
  width: 100%;
  min-height: var(--button-height);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--ground);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  padding: var(--space-4);
  cursor: pointer;
}

button.secondary-action, .button.secondary-action {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

button:hover, .button:hover { border-color: var(--accent-2); }
button:active, .button:active { filter: brightness(0.94); }
button:focus-visible, .button:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* The site's underlined tracked link, for anything that is an action but not
   the action. */
a.tertiary, .cta {
  display: inline-block;
  width: auto;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--accent);
  padding: 0 0 0.35rem;
  background: none;
  min-height: 0;
}
a.tertiary:hover, .cta:hover { color: var(--accent-2); }

/* Photographs are presented as plates: mounted, ruled, dated, never cropped. */
.plate {
  background: var(--surface);
  padding: var(--space-3);
  border: 1px solid var(--rule);
  margin-bottom: var(--space-3);
}
.plate img { display: block; width: 100%; height: auto; }
.plate figcaption { margin-top: var(--space-2); font-size: 0.8rem; color: var(--ink-2); }

/* Numerals set in the Didone, tabular, like the year pair on the site. */
.era-badge {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent-2);
  background: transparent;
  font-family: var(--didone);
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 2px var(--space-2);
}

.notice {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-3);
  margin-bottom: var(--space-5);
}
.notice.bad { border-left-color: var(--error); }
.notice.good { border-left-color: var(--success); }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  align-items: baseline;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--rule);
}
nav a {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
}
nav a:hover { color: var(--accent-2); }

/* Signing out is a form rather than a link, because a link somebody else can put in
   a page is not a decision. It still has to sit in the row like one, so the button
   inside it drops the full-width block shape every other button has. */
nav .sign-out { margin-left: auto; }
nav .sign-out button {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.74rem;
  color: var(--ink-2);
}
nav .sign-out button:hover { color: var(--accent-2); border-color: transparent; }

/* An account id is read off the screen and sent to somebody. Monospaced so a
   character cannot be mistaken, and selectable in one tap on a phone. */
code, .account-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  user-select: all;
  word-break: break-all;
}

/* The one action on a page that has only one. A class rather than a style
   attribute: the portal's content security policy is `default-src 'self'`, which
   blocks inline styles, so the attribute this replaces was never applied at all. */
.lone-action { margin-top: var(--space-6); }

/* The same rule, and the same reason, for the three pages that still carried it as
   an attribute: a tick box that must not stretch to the full-width input sizing, a
   block set apart from the form above it, and the reject form under the approve
   button. All three were written as `style="…"` and none of them ever applied. */
.tickbox { width: auto; min-height: auto; margin-right: var(--space-2); }
.set-apart { margin-top: var(--space-6); }
.under-the-last { margin-top: var(--space-3); }

/* The wordmark, as on the site. */
.wordmark { font-family: var(--didone); font-size: 1.5rem; letter-spacing: 0.02em; }
