/* The thin shell of the public pages (sign-in, invitation, a website form's answer).
   Tokens follow the accepted v6 customer visual language. */
:root {
  --ink: #16181d; --ink-2: #4d5665; --ink-3: #6b7484;
  --line: #e3e7ed; --line-2: #eef1f5; --bg: #f6f7f9; --card: #ffffff;
  --acc: #2c5fd6; --acc-bg: #eef2fd; --acc-line: #c9d7f6;
  --ok: #17795e; --ok-bg: #e8f5f0; --warn: #8a5a0a; --warn-bg: #fdf3e2; --bad: #b3261e; --bad-bg: #fdeceb;
  --r: 8px; --r-s: 6px;
  --shadow: 0 1px 2px rgba(20, 24, 32, .06), 0 8px 24px -12px rgba(20, 24, 32, .18);
  --head-bg: #ffffff; --head-ink: var(--ink); --head-line: var(--line);
}
body.surface-manage { --acc: #7a4e08; --acc-bg: #fbf7ef; --acc-line: #e6d3ad; --head-bg: #fbf7ef; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
a { color: var(--acc); }
h1 { font-size: 1.45rem; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .35rem; }
p { margin: .35rem 0; }
.muted { color: var(--ink-3); }
.sub { color: var(--ink-2); margin-top: -.25rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: .5rem; z-index: 10; }

.top { background: var(--head-bg); color: var(--head-ink); border-bottom: 1px solid var(--head-line); padding: .6rem 16px; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; }
.brand { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; }
.brand-sub { font-size: .8rem; opacity: .75; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; min-width: 0; }
.nav a { color: inherit; text-decoration: none; padding: .45rem .6rem; border-radius: var(--r-s); min-height: 44px; display: inline-flex; align-items: center; }
.nav a.active { background: var(--acc-bg); color: var(--acc); }
.who { display: flex; align-items: center; gap: .5rem; font-size: .9rem; flex-wrap: wrap; }
.context-bar { background: var(--acc-bg); border-bottom: 1px solid var(--acc-line); padding: .5rem 16px; font-size: .9rem; }
.main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding-block: 1rem 2rem; padding-inline: 16px; display: flex; flex-direction: column; gap: 1rem; }
.foot { padding: .75rem 16px; font-size: .8rem; color: var(--ink-3); border-top: 1px solid var(--line); background: var(--card); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; box-shadow: var(--shadow); min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.flash { padding: .65rem .9rem; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--card); }
.flash-ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.flash-error { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.flash-info { background: var(--acc-bg); border-color: var(--acc-line); }
.notice { padding: .6rem .8rem; border-radius: var(--r-s); background: var(--warn-bg); color: var(--warn); border: 1px solid #ecd39c; }
.notice-acc { background: var(--acc-bg); color: var(--ink); border-color: var(--acc-line); }

.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-muted { background: var(--line-2); color: var(--ink-2); }
.badge-acc { background: var(--acc-bg); color: var(--acc); }

.dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: .3rem 1rem; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list { padding-left: 1.2rem; margin: .25rem 0; }
.list li { margin: .25rem 0; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { color: var(--ink-3); font-weight: 600; }

form.stack { display: flex; flex-direction: column; gap: .6rem; max-width: 720px; }
form.inline { display: inline; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
label { display: block; font-weight: 600; font-size: .92rem; }
label .help { display: block; font-weight: 400; color: var(--ink-3); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select {
  width: 100%; max-width: 100%; font: inherit; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; color: var(--ink); min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
.choice { display: flex; flex-direction: column; gap: .35rem; }
.choice label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; min-height: 44px; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.choice input { margin-top: .3rem; width: 18px; height: 18px; flex: none; }
.btn { font: inherit; font-weight: 600; padding: .55rem .95rem; min-height: 44px; border-radius: var(--r-s); border: 1px solid transparent; cursor: pointer; background: var(--acc); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .85; }
.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--acc-line); outline-offset: 1px; }
.list-rows { display: flex; flex-direction: column; gap: .5rem; }
.list-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: .4rem; padding: .5rem; border: 1px dashed var(--line); border-radius: var(--r-s); }
details { border: 1px solid var(--line); border-radius: var(--r-s); padding: .4rem .7rem; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }
pre { background: var(--line-2); padding: .6rem; border-radius: var(--r-s); overflow-x: auto; font-size: .82rem; max-width: 100%; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .4rem 0; border-bottom: 1px solid var(--line-2); font-size: .92rem; overflow-wrap: anywhere; }
.timeline .t { color: var(--ink-3); font-size: .8rem; }
.qa { border-left: 3px solid var(--acc-line); padding: .25rem .75rem; margin: .5rem 0; }
.qa .q { color: var(--ink-3); font-size: .88rem; }
.because { font-size: .85rem; color: var(--acc); }
.steps { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .5rem 0; list-style: none; }
.steps li { padding: .3rem .6rem; border-radius: 999px; background: var(--line-2); font-size: .85rem; }
.steps li.now { background: var(--acc-bg); color: var(--acc); font-weight: 600; }
.steps li.done { background: var(--ok-bg); color: var(--ok); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; align-items: start; }
.customer-view { border-color: var(--acc-line); background: #fffdf8; }
/* Narrow screens: 16px input text (no zoom on focus) and 44px targets on the public shell too. */
@media (max-width: 480px) {
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select { font-size: 16px; }
  .card p > a:only-child, p.muted > a { display: inline-flex; align-items: center; min-height: 44px; }
  .dl { grid-template-columns: 1fr; gap: 0 0; }
  .dl dt { margin-top: .4rem; }
  .who { width: 100%; justify-content: space-between; }
}
