/* The Franking Room: light grey like the envelopes, charcoal writing, postbox red details (agreed 1 Dec 2026). */
:root {
  --bg: #eceef1; --panel: #ffffff; --ink: #2b2d31; --muted: #5d636b; --line: #d5d9df;
  --red: #b3121b; --red-dark: #8e0d14; --soft: #f6f7f9;
}
* { box-sizing: border-box; }
html { font-size: 112.5%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: 1.7rem; margin: 0 0 .5em; }
h3 { font-size: 1.25rem; margin: 0 0 .3em; }
a { color: var(--red); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.preview-bar { background: #fff4c2; color: #4a3b00; text-align: center; padding: 6px 12px; font-size: .9rem; }
.top { background: var(--panel); border-bottom: 3px solid var(--red); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 14px 20px; }
.brand img { display: block; height: 80px; width: auto; max-width: 100%; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a[aria-current="page"], .nav a:hover { color: var(--red); }
.nav summary { display: none; cursor: pointer; font-weight: 600; }
.nav .login { border: 2px solid var(--red); border-radius: 6px; padding: 2px 12px; color: var(--red); }
main { padding: 10px 20px 40px; }
.hero { padding: 48px 0 28px; }
.lead { font-size: 1.3rem; color: var(--muted); margin: 0 0 1em; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px; margin: 22px 0; }
.sub { color: var(--muted); margin-top: -.3em; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; border: 2px solid var(--red); color: var(--red); background: var(--panel); text-decoration: none; font-weight: 700; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card { position: relative; background: #dfe2e5; border: 1px solid #c3c8cd; border-radius: 4px; padding: 74px 22px 22px; box-shadow: 0 2px 5px rgba(0,0,0,.10); overflow: hidden; }
/* the envelope flap */
.card::before { content: ''; position: absolute; left: -1px; right: -1px; top: 0; height: 62px; background: #cfd3d8; clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 1px 0 #b9bec4); }
/* the franking mark, top right */
.card::after { content: ''; position: absolute; top: 8px; right: 10px; width: 96px; height: 40px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 40'%3E%3Cg fill='none' stroke='%23b3121b' stroke-width='2'%3E%3Ccircle cx='19' cy='20' r='16'/%3E%3Ccircle cx='19' cy='20' r='10' stroke-width='1'/%3E%3Cpath d='M40 13 q7 -5 14 0 t14 0 t14 0 t14 0'/%3E%3Cpath d='M40 20 q7 -5 14 0 t14 0 t14 0 t14 0'/%3E%3Cpath d='M40 27 q7 -5 14 0 t14 0 t14 0 t14 0'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain; opacity: .9; }
.card h3 { position: relative; }
.card p { margin: 0; }
.video-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.video-slot { aspect-ratio: 16 / 9; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 10px; background: var(--soft); }
.video-strip video { width: 100%; border-radius: 8px; display: block; }
.caption { font-family: Georgia, "Times New Roman", serif; font-style: italic; text-align: center; margin: 12px 0 0; }
.small { font-size: .9rem; color: var(--muted); }
.prose h2 { font-size: 1.35rem; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
table.postage, table.calc-lines { border-collapse: collapse; width: 100%; }
table.postage th, table.postage td, table.calc-lines td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
table.postage td:not(:first-child), table.postage th:not(:first-child), table.calc-lines td:last-child { text-align: right; white-space: nowrap; }
.calc { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr); gap: 26px; }
.calc-form { display: grid; gap: 14px; }
.calc-form label { display: block; font-weight: 600; }
.calc-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.calc-form fieldset label { display: inline-block; font-weight: 400; margin-right: 16px; }
.calc-form input[type=number], .calc-form select, .form input, .form select, .form textarea { display: block; width: 100%; margin-top: 4px; padding: 10px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.calc-result { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 16px; align-self: start; }
.calc-pack td { font-weight: 700; }
.calc-total td { font-weight: 700; font-size: 1.2rem; color: var(--red); border-bottom: none; }
.calc-note { font-size: .92rem; color: var(--muted); margin: 8px 0 0; }
.calc-error { color: var(--red); font-weight: 600; }
.form { display: grid; gap: 14px; max-width: 640px; }
.form label { font-weight: 600; }
.form .tick { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.form .tick input { width: auto; margin-top: 6px; }
.form .trap { position: absolute; left: -9999px; }
.notice { background: #fff4c2; border: 1px solid #e7d48a; border-radius: 8px; padding: 12px 16px; }
.logo-drafts { display: grid; gap: 22px; }
.logo-drafts figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.logo-drafts img { max-width: 100%; height: 110px; display: block; margin: 0 auto 10px; }
.logo-drafts .on-grey { background: #d9dcdf; }
.foot { border-top: 1px solid var(--line); padding: 22px 0 10px; text-align: center; color: var(--muted); }
.foot a { color: var(--ink); }
@media (max-width: 760px) {
  .calc { grid-template-columns: 1fr; }
  .nav summary { display: block; }
  .nav ul { flex-direction: column; margin-top: 8px; }
  .section { padding: 20px; }
}

/* Customer accounts (stage 2) */
.acct-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 18px 0 0; padding: 10px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.acct-nav a { font-weight: 700; color: var(--ink); text-decoration: none; }
.acct-nav a[aria-current="page"] { color: var(--red); }
.acct-nav form.inline { margin-left: auto; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--red); text-decoration: underline; cursor: pointer; }
.search { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 0 0 16px; }
.search label { flex: 1 1 280px; font-weight: 600; }
.search input { display: block; width: 100%; padding: 10px; font: inherit; border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; }
table.letters { border-collapse: collapse; width: 100%; }
table.letters th, table.letters td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
ol.stages { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--line); }
ol.stages li { position: relative; padding: 6px 0 12px 20px; color: var(--muted); }
ol.stages li::before { content: ''; position: absolute; left: -9px; top: 9px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
ol.stages li.done { color: var(--ink); }
ol.stages li.done::before { background: var(--red); border-color: var(--red); }
ol.stages li.returned::before { background: #555; border-color: #555; }
.letter-preview { white-space: normal; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px; max-height: 360px; overflow-y: auto; font-family: Georgia, serif; }
code.key { word-break: break-all; font-size: 1.05rem; background: #fff; padding: 6px 8px; border-radius: 4px; border: 1px solid var(--line); }
.prose pre { background: #1f2124; color: #f1f1f1; padding: 14px; border-radius: 8px; white-space: pre-wrap; word-break: break-word; }
ul.people { columns: 2 260px; }

/* What we post: a list with a drawing of each thing */
ul.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
li.item { display: grid; grid-template-columns: 160px 1fr; gap: 26px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
li.item:last-child { border-bottom: 0; }
li.item img { width: 160px; height: 120px; display: block; background: var(--soft); border-radius: 10px; }
li.item h3 { margin-bottom: .25em; }
li.item p { margin: 0; }
@media (max-width: 560px) { li.item { grid-template-columns: 1fr; gap: 10px; } li.item img { width: 120px; height: 90px; } }
