/* The Millers Design client portal.
   Brand: Instrument Serif for display (italic for section titles), Helvetica Light for text
   (Helvetica Neue Light on Apple devices, Inter Light elsewhere). Colors from themillers.design:
   paper cream, taupe band, slate ink. Square taupe buttons and thin ink rules, like the website. */

@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/instrument-serif-regular.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/static/fonts/instrument-serif-italic.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/fonts/inter-latin-wght-normal.woff2) format('woff2'); }

:root {
  --paper: #f2eee3;
  --sand: #e1d7cd;
  --frame: #bbaa99;
  --ink: #2a3030;
  --muted: #5c605d;
  --soft: #8b8a83;
  --field: #faf8f3;
  --hair: rgba(42, 48, 48, 0.16);
  --ok: #4d6b57;
  --warn: #8a6224;
  --bad: #9a3b33;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif;
  --narrow: 40rem;
  --wide: 70rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
strong, b { font-weight: 500; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--frame); }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--sand); }

/* ---------- Type ---------- */
h1, h2, h3, legend { font-family: var(--serif); font-weight: 400; margin: 0; color: var(--ink); }
h1 { font-size: clamp(3.25rem, 12vw, 5.75rem); line-height: 0.95; letter-spacing: -0.015em; }
h2 { font-style: italic; font-size: clamp(2.25rem, 6.5vw, 2.9rem); line-height: 1.05; letter-spacing: -0.005em; }
h3 { font-style: italic; font-size: 1.65rem; line-height: 1.15; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.prewrap { white-space: pre-wrap; }
.serif-note { font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1.3; color: var(--muted); }
code { font-size: 0.85em; background: var(--sand); padding: 0.05em 0.35em; }

/* ---------- Header: the same taupe band as the website ---------- */
.site-header { background: var(--sand); }
.site-header .bar {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}
.logo { display: block; line-height: 0; }
.logo img { height: 52px; width: auto; display: block; }
.nav { display: flex; gap: 0.5rem 2rem; align-items: center; flex-wrap: wrap; font-size: 0.95rem; letter-spacing: 0.06em; }
.nav a { text-decoration: none; color: var(--ink); padding: 0.2rem 0; }
.nav a:hover, .nav a[aria-current='page'] { box-shadow: inset 0 -1px 0 var(--ink); }
.nav form { margin: 0; }
.linkish { background: none; border: 0; padding: 0.2rem 0; font: inherit; letter-spacing: inherit; color: var(--muted); cursor: pointer; }
.linkish:hover { color: var(--ink); }

/* ---------- Layout ---------- */
main { padding: 3.75rem 1.5rem 5rem; }
.narrow { max-width: var(--narrow); margin: 0 auto; }
.mid { max-width: 52rem; margin: 0 auto; }
.wide { max-width: var(--wide); margin: 0 auto; }
.back { display: inline-block; margin-bottom: 2.25rem; font-size: 0.9rem; letter-spacing: 0.06em; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
section { margin-top: 4.5rem; }
section > h2 { margin-bottom: 1.4rem; }
.site-footer { max-width: var(--narrow); margin: 0 auto; padding: 0 1.5rem 3.5rem; color: var(--muted); font-size: 0.9rem; }
.site-footer .sig { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--ink); margin: 0 0 0.25rem; }
.site-footer .rule-top { border-top: 1px solid var(--ink); padding-top: 1.75rem; }

/* ---------- Buttons: square, taupe, thin ink border, like "Prices" on the website ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  background: var(--sand);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.85rem 1.7rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.ghost { background: transparent; }
.btn.small { padding: 0.5rem 0.95rem; font-size: 0.8rem; letter-spacing: 0.1em; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(154, 59, 51, 0.45); }
.btn.danger:hover { background: var(--bad); color: var(--paper); }
.actions { display: flex; gap: 1rem 1.5rem; flex-wrap: wrap; align-items: center; margin-top: 1.75rem; }
.actions a:not(.btn) { font-size: 0.92rem; letter-spacing: 0.04em; }
.inline-form { display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form select, .inline-form input[type] { width: auto; }

/* ---------- Client hero ---------- */
.hero { margin-bottom: 3.25rem; }
.hero .kicker { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--muted); margin: 0 0 0.35rem; }
.hero h1 { overflow-wrap: anywhere; margin-bottom: 1.6rem; }
.hero .when { margin: 0; letter-spacing: 0.07em; font-size: 0.98rem; line-height: 1.8; }
.hero .countdown { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--muted); margin: 0.9rem 0 0; }

/* Steps: a real sequence, so they're numbered, in the display serif. */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; border-top: 1px solid var(--ink); }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: baseline;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--hair);
  color: var(--soft);
  letter-spacing: 0.04em;
}
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 1.5rem; font-style: italic; line-height: 1; }
.steps li.done { color: var(--muted); }
.steps li.current { color: var(--ink); font-weight: 400; }
.steps .mark { font-size: 0.8rem; letter-spacing: 0.08em; }
.steps li.done .mark { color: var(--ok); }
.steps li.current .mark { color: var(--ink); }

/* The one thing to do now: taupe panel with a thin offset frame, like the framed photos on the website. */
.next {
  position: relative;
  margin: 3.25rem 0.6rem 0 0;
  background: var(--sand);
  padding: 2.4rem 2.1rem 2.1rem;
}
.next::after {
  content: '';
  position: absolute;
  inset: 0.6rem -0.6rem -0.6rem 0.6rem;
  border: 1px solid var(--frame);
  pointer-events: none;
}
.next > * { position: relative; z-index: 1; }
.next h2 { font-style: normal; font-size: clamp(2.3rem, 7.5vw, 3.1rem); margin-bottom: 0.9rem; }
.next p:last-child { margin-bottom: 0; }
.next .pay-how { border-top: 1px solid rgba(42, 48, 48, 0.25); margin-top: 1.4rem; padding-top: 1.25rem; }
.next .report { margin-top: 1.25rem; }
.next .report .hint { display: block; margin-bottom: 0.5rem; }

/* ---------- Package, line items, payments ---------- */
.includes { list-style: none; margin: 0 0 2.25rem; padding: 0; }
.includes li { padding: 0.3rem 0 0.3rem 1.6rem; position: relative; }
.includes li::before { content: ''; position: absolute; left: 0; top: 1.05em; width: 0.8rem; border-top: 1px solid var(--frame); }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ledger > li { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 0.9rem 0; border-bottom: 1px solid var(--hair); }
.ledger .amt { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ledger > li.sum { border-bottom: 1px solid var(--ink); align-items: center; }
.ledger > li.sum .amt { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.ledger .sub { display: block; margin-top: 0.25rem; }
.ledger .tools { margin-top: 0.8rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.footnote { margin-top: 1.1rem; font-size: 0.88rem; color: var(--muted); }
.ledger-after { margin-top: 2.75rem; margin-bottom: 0.6rem; }

/* Zelle details with the QR code beside them. */
.zelle { display: flex; gap: 1.25rem; align-items: flex-start; }
.zelle p:last-child { margin-bottom: 0; }
.zelle-qr { flex: none; width: 150px; height: 150px; background: #fff; border: 1px solid var(--frame); }
@media (max-width: 30rem) { .zelle { flex-direction: column; } .zelle-qr { width: 140px; height: 140px; } }

/* Status: a small dot and words, not a pill. */
.status { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; letter-spacing: 0.05em; color: var(--muted); white-space: nowrap; }
.status::before { content: ''; width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--frame); flex: none; }
.status.paid, .status.booked, .status.signed, .status.completed { color: var(--ok); }
.status.paid::before, .status.booked::before, .status.signed::before, .status.completed::before { background: var(--ok); }
.status.reported, .status.proposal { color: var(--warn); }
.status.reported::before, .status.proposal::before { background: #c69a52; }
.status.overdue { color: var(--bad); }
.status.overdue::before { background: var(--bad); }
.status.lost::before { background: #b9b3a8; }

/* ---------- Tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.85rem 1.25rem 0.85rem 0; border-bottom: 1px solid var(--hair); vertical-align: middle; }
thead th { font-weight: 400; font-size: 0.82rem; letter-spacing: 0.08em; color: var(--muted); border-bottom: 1px solid var(--ink); }
td.num, th.num { text-align: right; padding-right: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.client-link { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; line-height: 1.1; }
.client-link:hover { text-decoration: underline; }
.scroll { overflow-x: auto; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 400; font-size: 0.88rem; letter-spacing: 0.06em; margin-bottom: 0.45rem; }
.hint { font-weight: 300; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.02em; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  color: var(--ink);
  background: var(--field);
  border: 1px solid rgba(42, 48, 48, 0.35);
  border-radius: 0;
  padding: 0.75rem 0.85rem;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 52%, calc(100% - 0.78rem) 52%;
  background-size: 0.34rem 0.34rem;
  background-repeat: no-repeat;
  padding-right: 2.3rem;
}
textarea { min-height: 8rem; line-height: 1.55; resize: vertical; }
textarea.tall { min-height: 34rem; font-size: 0.95rem; }
textarea.short { min-height: 5.5rem; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 1px solid var(--ink); outline-offset: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 1.05rem; height: 1.05rem; }
.field { margin-bottom: 1.45rem; }
.row { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 300; letter-spacing: 0.01em; font-size: 1rem; margin-bottom: 0.6rem; }
.check input { margin-top: 0.3rem; flex: none; }
fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
legend { font-style: italic; font-size: 1.65rem; margin-bottom: 0.7rem; padding: 0; }
.w-amount { width: 7.5rem !important; }
.w-pct { width: 5.5rem !important; }
.grow { flex: 1 1 14rem; }

/* ---------- Messages ---------- */
.flash { border-left: 2px solid var(--ok); background: var(--field); padding: 1.1rem 1.3rem; margin-bottom: 2.25rem; }
.flash.warn { border-left-color: var(--warn); }
.flash .linkbox { margin-top: 0.85rem; }
.linkbox { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.linkbox input { flex: 1 1 18rem; font-size: 0.85rem; }
.error { border-left: 2px solid var(--bad); background: var(--field); color: var(--bad); padding: 0.9rem 1.2rem; margin-bottom: 1.5rem; }
.notice { border-left: 2px solid var(--frame); background: var(--field); padding: 0.9rem 1.2rem; margin-bottom: 2rem; }

/* ---------- Sign-in pages: framed photo beside the form ---------- */
.auth-wrap { display: grid; gap: 3rem; align-items: center; max-width: 62rem; margin: 0 auto; }
.auth-photo { position: relative; margin: 0 0.8rem 0.8rem 0; }
.auth-photo img { display: block; width: 100%; height: auto; max-height: 76vh; aspect-ratio: 4 / 5; object-fit: cover; position: relative; z-index: 1; background: var(--sand); }
.auth-photo::after { content: ''; position: absolute; inset: 0.8rem -0.8rem -0.8rem 0.8rem; border: 1px solid var(--frame); }
.auth { max-width: 25rem; width: 100%; }
.auth h1 { font-size: clamp(3rem, 10vw, 4.25rem); margin-bottom: 0.6rem; }
.auth .lede { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--muted); margin-bottom: 2.25rem; line-height: 1.3; }
.auth .after { margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1px solid var(--hair); font-size: 0.9rem; color: var(--muted); }
@media (min-width: 52rem) {
  .auth-wrap { grid-template-columns: 1fr 1fr; gap: 5.5rem; }
}
@media (max-width: 51.99rem) {
  .auth-photo { display: none; }
}

/* ---------- Contract ---------- */
.contract {
  background: var(--field);
  border: 1px solid rgba(42, 48, 48, 0.22);
  padding: 2.25rem;
  white-space: pre-wrap;
  font-size: 1rem;
  line-height: 1.75;
  max-height: 65vh;
  overflow: auto;
}
.contract.signed { max-height: none; }
.signature { margin-top: 2.25rem; }
.signature .name { font-family: var(--serif); font-style: italic; font-size: 2.6rem; line-height: 1; border-bottom: 1px solid var(--ink); padding: 0 0.25rem 0.45rem 0; display: inline-block; min-width: min(18rem, 100%); }
.signature .when { margin-top: 0.6rem; font-size: 0.88rem; color: var(--muted); letter-spacing: 0.04em; }
.sign-form { margin-top: 2.75rem; }
.sign-form .sig-input { font-family: var(--serif); font-style: italic; font-size: 2rem; padding: 0.35rem 0.1rem; background: transparent; border: 0; border-bottom: 1px solid var(--ink); }
.sign-form .sig-input:focus { outline: none; box-shadow: 0 1px 0 var(--ink); }

/* ---------- Admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 2.75rem; }
.admin-head h1 { font-size: clamp(3rem, 7.5vw, 4.5rem); }
.admin-head .sub { margin: 0.75rem 0 0; letter-spacing: 0.05em; color: var(--muted); display: flex; gap: 0.5rem 1.25rem; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 0.5rem 2rem; flex-wrap: wrap; margin: 0 0 0.75rem; padding: 0; list-style: none; }
.tabs a { display: inline-block; padding: 0.35rem 0; text-decoration: none; color: var(--muted); letter-spacing: 0.05em; font-size: 0.95rem; }
.tabs a[aria-current='true'] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
h2 + .attention { margin-top: 1.4rem; }
.attention { list-style: none; padding: 0; margin: 0 0 4rem; border-top: 1px solid var(--ink); }
.attention li { display: flex; justify-content: space-between; gap: 0.75rem 2rem; flex-wrap: wrap; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--hair); }
.attention .what a { font-family: var(--serif); font-size: 1.45rem; text-decoration: none; }
.attention .what a:hover { text-decoration: underline; }
.panel { background: var(--field); border: 1px solid rgba(42, 48, 48, 0.2); padding: 1.25rem 1.5rem; }
.panel + .panel { margin-top: 0.75rem; }
.grid-2 { display: grid; gap: 1rem 4.5rem; grid-template-columns: 1fr; }
@media (min-width: 62rem) { .grid-2 { grid-template-columns: 1.35fr 1fr; } }
.grid-2 > div > section:first-child { margin-top: 0; }
.people { list-style: none; padding: 0; margin: 0 0 1.25rem; border-top: 1px solid var(--ink); }
.people > li { padding: 1rem 0; border-bottom: 1px solid var(--hair); }
.people .who { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; }
.people .role { font-size: 0.82rem; letter-spacing: 0.08em; color: var(--muted); margin-left: 0.45rem; }
.people .tools { margin-top: 0.55rem; }
.activity { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; border-top: 1px solid var(--ink); }
.activity li { padding: 0.7rem 0; border-bottom: 1px solid var(--hair); }
.activity .t { display: block; color: var(--soft); font-size: 0.8rem; letter-spacing: 0.05em; margin-top: 0.1rem; }
details > summary { cursor: pointer; letter-spacing: 0.05em; font-size: 0.95rem; margin: 0.9rem 0; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '+'; display: inline-block; width: 1.2rem; font-family: var(--serif); font-size: 1.35rem; line-height: 1; }
details[open] > summary::before { content: '–'; }
details.panel > summary { margin: 0; font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0; }
details.panel > summary .hint { font-family: var(--sans); margin-left: 0.5rem; }
details.panel[open] > summary { margin-bottom: 1.1rem; }
.item-edit { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; width: 100%; }
.item-edit input[type=text] { padding: 0.55rem 0.65rem; }
.empty { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--muted); padding: 2rem 0; }
.below { margin-top: 1rem; }
.stack > * + * { margin-top: 0.75rem; }

@media (max-width: 40rem) {
  main { padding: 2.5rem 1.25rem 4rem; }
  .site-header .bar { padding: 0.9rem 1.25rem; }
  .logo img { height: 42px; }
  .nav { gap: 0.4rem 1.25rem; font-size: 0.88rem; }
  .next { padding: 1.9rem 1.5rem 1.6rem; }
  .contract { padding: 1.35rem; }
  .hide-sm { display: none; }
  .site-footer { padding: 0 1.25rem 3rem; }
}

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

@media print {
  .site-header, .site-footer, .actions, .no-print, .back { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .contract { border: 0; padding: 0; max-height: none; background: #fff; }
}
