/* /making-tax-digital (templates/mtd.html + pages/making-tax-digital.html). Loaded after site.css and home.css and built from
   their tokens and devices (hero, .inbox, .turn, .control-card, .faq); only what is specific to this page lives here.
   The one bold thing is the quarter ledger in the hero: four deadlines, the next one stamped. Everything else stays quiet. */

/* hero: copy left, the ledger right */
.mtd-hero .crumbs { margin-bottom: 1em; }
.mtd-hero h1 { max-width: 15ch; }
@media (min-width: 1100px) { .mtd-hero h1 { max-width: 15ch; font-size: clamp(2.6rem, 1.4rem + 3.4vw, 3.9rem); } }
@media (min-width: 900px) { .mtd-hero .hero-grid.hero-demo { align-items: center; } .mtd-hero .hero-in { padding-top: 0; } }

.mtd-ledger { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 60px -36px rgba(15, 27, 45, .45); overflow: hidden; }
.mtd-ledger-head { padding: 14px 22px; font-weight: 600; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .95rem; }
.mtd-ledger-rows { list-style: none; margin: 0; padding: 0; }
.mtd-ledger-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 16px; padding: 15px 22px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.mtd-ledger-q { font-size: .95rem; }
.mtd-ledger-due { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
/* the next deadline: the date set large in the ledger's own ruled row, a left rule in the stamp blue, the count as a stamp */
.mtd-ledger-rows li.is-next { grid-template-columns: minmax(0, 1fr); padding: 20px 22px 22px; background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); color: var(--ink); }
.mtd-ledger-rows li.is-next .mtd-ledger-due { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; white-space: normal; }
.mtd-ledger-rows li.is-next .mtd-ledger-q { font-weight: 500; }
.mtd-stamp { justify-self: start; margin-top: 10px; padding: 3px 10px; border: 2px solid var(--accent); border-radius: 6px; color: var(--accent); font-weight: 700; font-size: .9rem; transform: rotate(-2deg); transform-origin: left center; }
.mtd-ledger-foot { margin: 0; padding: 14px 22px 16px; font-size: .86rem; line-height: 1.5; color: var(--ink-2); }

/* two columns from 900 px: text left, a device right */
.mtd-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.mtd-split > * { min-width: 0; }
.mtd-split h2 { max-width: 20ch; }
@media (min-width: 900px) {
  .mtd-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mtd-split-wide { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .mtd-faq { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
  .mtd-faq .section-head { position: sticky; top: 88px; margin-bottom: 0; }
}

/* the pains: a ruled list, each line opening with what went wrong */
.mtd-pains { list-style: none; margin: 0; padding: 0; }
.mtd-pains li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.mtd-pains li:last-child { border-bottom: 1px solid var(--line); }
.mtd-pains strong { color: var(--ink); margin-right: 4px; }

/* the turn, then what it does and what it does not */
.mtd-turn { max-width: 30ch; margin-bottom: clamp(24px, 4vw, 40px); }
.mtd-scope { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); }
@media (min-width: 900px) { .mtd-scope { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mtd-scope .h3 { margin-bottom: .7em; }
.mtd-scope ul.checks { margin: 0; }
.mtd-not { padding-left: 20px; border-left: 3px solid var(--ink); }
.mtd-not p:last-child { margin-bottom: 0; }

/* one quarter as a run of six moments on a single line (a real sequence, so it is drawn as one) */
.mtd-run { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); position: relative; }
.mtd-run li { position: relative; padding: 0 0 26px 30px; }
.mtd-run li::before { content: ""; position: absolute; left: 0; top: 5px; width: 13px; height: 13px; border-radius: 999px; background: var(--surface-dark); border: 2px solid #8fb0ff; box-sizing: border-box; }
.mtd-run li::after { content: ""; position: absolute; left: 6px; top: 22px; bottom: 0; width: 1px; background: rgba(232, 235, 240, .28); }
.mtd-run li:last-child { padding-bottom: 0; }
.mtd-run li:last-child::after { display: none; }
.mtd-run li.is-end::before { background: #fff; border-color: #fff; }
.mtd-run-when { display: block; font-size: .9rem; font-weight: 600; color: #a9c2ff; margin-bottom: 4px; }
.mtd-run h3 { font-size: 1.08rem; margin-bottom: .3em; }
.mtd-run p { margin: 0; font-size: .95rem; line-height: 1.5; color: rgba(232, 235, 240, .78); max-width: 46ch; }
.mtd-run-note { margin: clamp(24px, 4vw, 36px) 0 0; font-size: .95rem; color: rgba(232, 235, 240, .78); max-width: 70ch; }
@media (min-width: 1000px) {
  .mtd-run { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 22px; }
  .mtd-run li { padding: 30px 0 0; }
  .mtd-run li::before { top: 0; }
  .mtd-run li::after { left: 19px; right: -22px; top: 6px; bottom: auto; width: auto; height: 1px; }
}

/* the checklist as the client's list: the items of the real template, required or not */
.mtd-steps { margin: 0 0 1.2em; padding-left: 1.3em; }
.mtd-steps li { padding: 4px 0 4px 4px; font-weight: 500; }
.mtd-list { padding-bottom: 0; }
.mtd-list .inbox-head { gap: 12px; align-items: baseline; }
.mtd-list-n { flex: none; color: var(--ink-2); font-weight: 500; font-size: .88rem; }
.mtd-list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); font-weight: 500; }
.mtd-list-row:last-child { border-bottom: 0; }
.mtd-list-row .ph-tag { font-size: .72rem; }

/* the rules table: the question column stays narrow and reads as a label */
.mtd-facts th { text-transform: none; letter-spacing: 0; font-size: .92rem; white-space: normal; }
.mtd-facts th[scope="row"] { width: 11.5em; text-align: left; vertical-align: top; font-weight: 600; color: var(--ink); font-size: 1rem; padding: 12px; }
.mtd-facts td { vertical-align: top; }
@media (max-width: 640px) {
  .mtd-facts thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mtd-facts tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .mtd-facts tr:last-child { border-bottom: 0; }
  .mtd-facts th[scope="row"], .mtd-facts td { display: block; width: auto; padding: 0; border: 0; }
  .mtd-facts th[scope="row"] { margin-bottom: 4px; }
}

/* the two UK reviews side by side, ruled like the home page's side column */
.mtd-reviews { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 48px; }
.mtd-reviews .rv { padding: 18px 0; border-top: 1px solid var(--line); margin: 0; }
@media (min-width: 900px) { .mtd-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
