/* The owner's record page (signed-in, Operate surface). Tokens and rules from DESIGN.md.
   Builds on ../styles.css for the fonts and the base palette. */

.signed-in {
  --body: #39445c;
  --border-strong: #8a7f6e;
  --link-visited: #6b5a7a;
  --focus: #85621f;
  font-size: 18px;
  line-height: 1.6;
}
.signed-in ::selection { background: var(--brass-tint); color: var(--ink); }
.signed-in :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.signed-in a { text-underline-offset: 3px; }
.signed-in a:visited { color: var(--link-visited); }
.signed-in .muted { color: var(--harbor); font-size: 16px; }
.signed-in p { margin: 0; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 30; }
.skip:focus { left: 16px; top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sample-banner { background: var(--brass-tint); color: var(--brass-text); text-align: center; font-size: 15px; font-weight: 600; padding: 8px 16px; }
.sample-banner a { color: inherit; margin-left: 6px; }

/* Header and navigation (design review 3A) */
.app-header { border-bottom: 1px solid var(--stone); background: var(--paper); }
.app-header-row { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.app-nav { display: flex; gap: 28px; }
.app-nav a { color: var(--harbor); text-decoration: none; font-size: 16px; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.app-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.bottom-bar { display: none; }

/* One reading column (16A, 17A); only the customer table may run wider. */
.record { max-width: 820px; margin: 0 auto; padding: 32px 24px 96px; }
.record-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.record h1 { font-size: clamp(32px, 4vw, 40px); line-height: 1.1; margin-bottom: 4px; }
.sec { padding: 36px 0 32px; border-top: 1px solid var(--stone); }
.record-head + .sec { border-top: 0; padding-top: 24px; }
.sec h2 { font-size: 30px; line-height: 1.2; margin-bottom: 6px; }
.sec h3 { font-size: 22px; line-height: 1.3; margin-bottom: 8px; }
.sec h3.sub { margin-top: 36px; }
.sec > .muted { margin-bottom: 18px; }

/* Buttons (12A): real controls, one primary per page, 48px tall. */
.signed-in .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 17px var(--font-ui); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.signed-in .btn-primary { background: var(--ink); color: var(--paper); }
.signed-in .btn-primary:hover { background: var(--ink-raised); }
.signed-in .btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.signed-in .btn-secondary:hover { border-color: var(--ink); }
.signed-in .btn-text { color: var(--harbor); text-decoration: underline; padding: 0 8px; }

/* This month (2A) */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li, .rows li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; border-top: 1px solid var(--stone-soft); }
.steps li:first-child, .rows li:first-child { border-top: 0; }
.steps .area { font-size: 15px; color: var(--harbor); margin-top: 2px; }
.rows { list-style: none; margin: 0 0 24px; padding: 0; }

/* Facts: serif figures, a source mark on each (13A) */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; margin: 0 0 12px; }
.facts dt { font-size: 15px; font-weight: 600; color: var(--harbor); }
.facts dd { margin: 4px 0 0; }
.figure { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1.1; color: var(--ink); }
.src { font-size: 13px; font-weight: 700; color: var(--harbor); margin-left: 3px; vertical-align: super; }
.note { display: block; font-size: 16px; color: var(--body); margin-top: 2px; }
td .note { display: inline; font-size: 15px; }
.key { font-size: 15px; color: var(--harbor); margin: 0 0 24px; }
.key .src { margin: 0 3px 0 0; }

/* Panels (11A): only the customer table and the key-person flag. */
.panel { background: var(--surface); border: 1px solid var(--stone); border-radius: 14px; }
.table-panel { padding: 4px 20px 16px; margin: 0 -40px 20px; }
.customers { width: 100%; border-collapse: collapse; font-size: 16px; }
.customers th, .customers td { text-align: left; padding: 12px 8px; border-top: 1px solid var(--stone-soft); vertical-align: top; font-weight: 400; }
.customers thead th { border-top: 0; font-size: 15px; font-weight: 600; color: var(--harbor); padding-top: 14px; }
.customers tbody th { font-weight: 600; }
.customers .r { text-align: right; }
.customers td.num { white-space: nowrap; }
.customers .quiet th, .customers .quiet td { color: var(--body); font-weight: 400; }
.down { color: var(--rose-text); font-weight: 600; }
.table-note { font-size: 15px; color: var(--body); padding: 12px 8px 0; }
.flag { background: var(--brass-tint); border: 0; padding: 20px 22px; margin-bottom: 24px; }
.flag p { color: var(--ink); }
.limits { padding-top: 4px; }
.limits ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; color: var(--body); }

/* Source chips (13A): 14px, sentence case. */
.chip { font-size: 14px; padding: 2px 10px; vertical-align: 1px; margin-left: 6px; }
.chip-bank { background: var(--ink); color: var(--paper); }
.chip-matched { background: var(--stone-soft); color: var(--ink); border: 1px dashed var(--border-strong); }
.chip-seller { background: var(--stone-soft); color: var(--ink); margin-left: 0; margin-right: 6px; }
.chip-owner { background: var(--brass-tint); color: var(--brass-text); font-family: var(--font-ui); }

/* Interview profile: a section, not a box. */
.profile { margin: 8px 0 0; }
.profile dl { margin: 0; }
.profile dl > div { padding: 10px 0; border-top: 1px solid var(--stone-soft); }
.profile dt, .areas dt { font-size: 15px; font-weight: 600; color: var(--harbor); }
.profile dd { margin: 2px 0 0; }

/* Five areas (14A): plain counts, no bars. */
.areas { margin: 0; }
.areas > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--stone-soft); }
.areas dt { color: var(--ink); font-size: 17px; font-weight: 400; }
.areas dd { margin: 0; color: var(--body); text-align: right; }

.sample-cta { border-top: 1px solid var(--stone); padding-top: 40px; }
.sample-cta h2 { font-size: 26px; margin-bottom: 14px; }

@media (max-width: 1024px) {
  .table-panel { margin-left: 0; margin-right: 0; }
}

/* Phones (17A): customer rows, not a sideways table; the menu moves to a bottom bar. */
@media (max-width: 640px) {
  .app-nav { display: none; }
  .app-header-row { padding: 0 16px; }
  .record { padding: 24px 16px 120px; }
  .record-head .btn { width: 100%; }
  .steps li, .rows li { flex-direction: column; align-items: stretch; }
  .steps .btn, .rows .btn { width: 100%; }
  .facts { grid-template-columns: 1fr; }
  .table-panel { padding: 4px 14px 14px; }
  .customers thead { display: none; }
  .customers, .customers tbody, .customers tr, .customers th, .customers td { display: block; width: 100%; }
  .customers tr { padding: 12px 0; border-top: 1px solid var(--stone-soft); }
  .customers tbody tr:first-child { border-top: 0; }
  .customers th, .customers td { border: 0; padding: 2px 0; text-align: left; }
  .customers td.r { text-align: left; }
  .customers td[data-label]::before { content: attr(data-label) ": "; color: var(--harbor); font-size: 15px; }
  .customers td:empty { display: none; }
  .bottom-bar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--stone); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-bar a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-size: 15px; color: var(--harbor); text-decoration: none; }
  .bottom-bar a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--brass); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
