/* The free TV Licence service: the form (/TV-Licence) and each person's record. */
:root {
  --ink: #1b2433;
  --body: #4a5462;
  --muted: #6b7a8c;
  --line: #e3e7ec;
  --panel: #f6f8fa;
  --button: #1e293b;
  --ok: #166534; --ok-bg: #dcfce7;
  --err: #991b1b; --err-bg: #fee2e2;
  --warn: #92400e; --warn-bg: #fef3c7;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: #fff; color: var(--body);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.65;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 40px 20px 56px; }
.eyebrow { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
h1 { color: var(--ink); font-size: clamp(26px, 5vw, 34px); line-height: 1.2; margin: 0 0 14px; }
h2 { color: var(--ink); font-size: 20px; margin: 36px 0 10px; }
h3 { color: var(--ink); font-size: 17px; margin: 22px 0 8px; }
.lead { font-size: 18px; margin: 0 0 18px; }
a { color: var(--ink); }
.small { font-size: 14px; color: var(--muted); display: block; }
.foot { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 16px; }
.banner { background: var(--warn-bg); color: var(--warn); font-weight: 700; border-radius: 8px; padding: 10px 14px; }
.error { background: var(--err-bg); color: var(--err); border-radius: 8px; padding: 10px 14px; }
.good { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 10px 14px; }
.ok { color: var(--ok); }
.card { background: var(--panel); border-radius: 10px; padding: 18px 20px; margin: 14px 0; }
.card h3 { margin-top: 0; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cards .card { margin: 0; }
ul.plain { padding-left: 20px; }
ul.plain li { margin-bottom: 8px; }
.button {
  display: inline-block; background: var(--button); color: #fff; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; padding: 12px 20px; border-radius: 8px;
}
.button.big { font-size: 18px; padding: 15px 28px; }
.button.quiet { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.button:disabled { opacity: .6; cursor: wait; }
.small-btn { font-size: 14px; padding: 7px 12px; margin-top: 6px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link-btn.danger { color: var(--err); }
form.send { margin: 28px 0 14px; }

/* the form */
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 6px; margin: 0 0 18px; }
legend { color: var(--ink); font-weight: 700; padding: 0 6px; }
label { display: block; margin: 0 0 14px; color: var(--ink); font-weight: 600; }
label .small { font-weight: 400; }
input[type=text], input[type=email] {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 17px;
  padding: 10px 12px; border: 1px solid #c8d0da; border-radius: 8px; color: var(--ink); background: #fff;
}
input[type=file] { display: block; margin-top: 6px; font-size: 15px; max-width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
label.tick { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--body); }
label.tick input { width: 22px; height: 22px; margin-top: 3px; flex: 0 0 auto; }
.hp { position: absolute; left: -9999px; }
.reader { background: var(--panel); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.status { min-height: 1.4em; }

/* the record */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
pre.notice-text {
  white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 15px; line-height: 1.55;
  background: var(--panel); border-radius: 8px; padding: 14px 16px; margin: 10px 0;
}
details { border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; margin: 8px 0; }
details summary { cursor: pointer; color: var(--ink); font-weight: 600; }
table.delivery { width: 100%; border-collapse: collapse; font-size: 15px; }
table.delivery th, table.delivery td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
ul.photos { list-style: none; padding: 0; margin: 0; }
ul.photos li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
ul.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
form.add-letter { background: var(--panel); border-radius: 10px; padding: 16px 18px; margin-top: 16px; }

/* the steps: what's required stands out, what's optional is grey */
:root { --accent: #2563eb; --accent-bg: #eff6ff; }
ol.journey { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0 6px; }
ol.journey li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 15px; font-weight: 600; }
ol.journey li b { width: 26px; height: 26px; border-radius: 50%; background: #cbd5e1; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
ol.journey li.now { background: var(--accent-bg); color: var(--accent); }
ol.journey li.now b { background: var(--accent); }
ol.journey li.done { color: var(--ok); }
ol.journey li.done b { background: var(--ok); }
.step { border: 2px solid var(--line); border-radius: 14px; padding: 18px 20px 8px; margin: 20px 0; background: #fff; transition: border-color .2s, box-shadow .2s; }
.step.current { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.step-head h2 { margin: 0; font-size: 21px; }
.num { width: 34px; height: 34px; border-radius: 50%; background: var(--button); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.step.current .num { background: var(--accent); }
.step.done .num { background: var(--ok); font-size: 0; }
.step.done .num::after { content: '✓'; font-size: 18px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.pill.req { background: var(--button); color: #fff; }
.pill.opt { background: #e5e7eb; color: #6b7280; }
.optional { background: #f6f7f9; border: 1px dashed #cfd6de; border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; color: var(--muted); }
.optional label { color: #4b5563; }
details.optional summary { cursor: pointer; color: #4b5563; font-weight: 600; }
details.optional[open] summary { margin-bottom: 12px; }
.file-btn { display: inline-flex; align-items: center; gap: 8px; position: relative; background: #fff; border: 1px solid #c8d0da; border-radius: 8px; padding: 10px 16px; font-weight: 600; color: var(--ink); cursor: pointer; margin: 4px 0 6px; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.req-mark { color: var(--err); font-weight: 700; }
.next-note { font-size: 15px; color: var(--muted); margin: 10px 0 0; }
.big-step { border: 2px solid var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); background: #fff; border-radius: 14px; padding: 20px; margin: 18px 0; }
.big-step h2 { margin-top: 0; }
.mailbox-hint { display: flex; gap: 12px; background: var(--accent-bg); border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: 16px; }
.mailbox-hint .icon { font-size: 26px; line-height: 1; }
input.code { font-size: 30px; letter-spacing: .35em; text-align: center; max-width: 260px; font-weight: 700; padding: 10px; }
.button.wide { display: block; width: 100%; text-align: center; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 12px; }

/* "Something's happened": three big choices */
details.choice { border: 2px solid var(--line); border-radius: 12px; padding: 0; margin: 10px 0; background: #fff; }
details.choice > summary { list-style: none; cursor: pointer; padding: 14px 18px; font-size: 18px; font-weight: 700; color: var(--ink); }
details.choice > summary::-webkit-details-marker { display: none; }
details.choice > summary::after { content: '›'; float: right; font-size: 22px; line-height: 1; transition: transform .2s; }
details.choice[open] > summary::after { transform: rotate(90deg); }
details.choice[open] { border-color: var(--accent); }
details.choice > :not(summary) { margin-left: 18px; margin-right: 18px; }
details.choice > form { padding-bottom: 14px; }
textarea, select { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #c8d0da; border-radius: 8px; color: var(--ink); background: #fff; }
input[type=date], input[type=time] { display: block; width: 100%; margin-top: 4px; font: inherit; padding: 9px 12px; border: 1px solid #c8d0da; border-radius: 8px; }
.copyable { overflow-wrap: anywhere; }
table.parts { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 15px; }
table.parts th { text-align: left; font-weight: 600; color: var(--ink); padding: 8px 6px; border-top: 1px solid var(--line); width: 40%; }
table.parts td { padding: 8px 4px; border-top: 1px solid var(--line); }
table.parts label.tick { margin: 0; font-size: 14px; gap: 6px; }
table.parts label.tick input { width: 18px; height: 18px; margin-top: 2px; }

@media (max-width: 640px) {
  table.parts, table.parts tbody, table.parts tr, table.parts th, table.parts td { display: block; width: 100%; }
  table.parts th { border-top: 1px solid var(--line); padding-bottom: 2px; }
  table.parts td { border: 0; padding: 2px 4px; }
}

@media (max-width: 640px) {
  .wrap { padding: 28px 16px 40px; }
  .cards, .row2 { grid-template-columns: 1fr; }
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dd { margin-bottom: 6px; }
}
@media print {
  .noprint, form, .foot { display: none !important; }
  details { border: 0; padding: 0; }
  body { font-size: 12pt; }
}
