/* Landlord Register Help. One stylesheet, light and dark, no framework. */
:root {
  --bg: #f8f5ef; --surface: #ffffff; --surface-2: #f1ece2; --ink: #1b2330; --muted: #5a6473; --line: #ddd5c6;
  --brand: #0e5e4d; --brand-ink: #ffffff; --brand-soft: #e2f1ec; --link: #0b5a8a;
  --ok: #0e6b4f; --ok-soft: #e0f2ea; --warn: #9a4a06; --warn-soft: #fdefd8; --bad: #a3231a; --bad-soft: #fbe6e3; --na: #6b7280; --na-soft: #eceef1;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(27,35,48,.06), 0 8px 24px rgba(27,35,48,.07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --wrap: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12171f; --surface: #1a212c; --surface-2: #222b38; --ink: #eef1f5; --muted: #a3adbb; --line: #323d4d;
    --brand: #4fc3a5; --brand-ink: #0c1512; --brand-soft: #17332d; --link: #7cc4f0;
    --ok: #5fd0a4; --ok-soft: #173328; --warn: #f2b25c; --warn-soft: #3a2a12; --bad: #f08a80; --bad-soft: #3b1c19; --na: #9aa4b2; --na-soft: #262f3c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  --bg: #12171f; --surface: #1a212c; --surface-2: #222b38; --ink: #eef1f5; --muted: #a3adbb; --line: #323d4d;
  --brand: #4fc3a5; --brand-ink: #0c1512; --brand-soft: #17332d; --link: #7cc4f0;
  --ok: #5fd0a4; --ok-soft: #173328; --warn: #f2b25c; --warn-soft: #3a2a12; --bad: #f08a80; --bad-soft: #3b1c19; --na: #9aa4b2; --na-soft: #262f3c;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-top: 1.8em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow); z-index: 45; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { filter: brightness(1.08); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 7px 11px; border-radius: 8px; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.indie { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.indie .wrap { padding-top: 6px; padding-bottom: 6px; }

/* hero */
.hero { padding: 48px 0 28px; }
.hero p.lede { font-size: 1.2rem; color: var(--muted); max-width: 46em; }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
main { padding-bottom: 64px; }
.crumbs { font-size: .9rem; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }

/* cards and layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.tool-link { display: block; text-decoration: none; color: var(--ink); transition: transform .12s ease, border-color .12s ease; }
.tool-link:hover { transform: translateY(-2px); border-color: var(--brand); }
.tool-link strong { display: block; font-family: var(--serif); font-size: 1.2rem; margin-bottom: 4px; }
.tool-link span { color: var(--muted); font-size: .95rem; }

/* forms */
label { font-weight: 600; display: block; margin-bottom: 4px; font-size: .95rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; display: block; }
input[type=text], input[type=date], input[type=number], input[type=email], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%; height: 46px; box-sizing: border-box; line-height: 1.3;
}
textarea { height: auto; min-height: 92px; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus { border-color: var(--brand); }
.btn { font: inherit; font-weight: 700; cursor: pointer; border: 1.5px solid var(--brand); background: var(--brand); color: var(--brand-ink); border-radius: var(--radius-sm); padding: 10px 18px; min-height: 46px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.quiet { background: transparent; border-color: var(--line); color: var(--ink); font-weight: 600; }
.btn.small { min-height: 36px; padding: 5px 12px; font-size: .9rem; }
.btn.danger { border-color: var(--bad); color: var(--bad); background: transparent; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > .grow { flex: 1 1 200px; }
/* Form grid: two equal columns. Each field is three rows (label, control, hint) that line up across the row,
   so controls sit level whatever the label or hint length. One column on a phone. */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 0; align-items: start; }
.field { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 6px; margin-bottom: 18px; min-width: 0; }
.field > label { margin: 0; align-self: end; line-height: 1.3; }
.field > .hint { margin: 0; line-height: 1.35; }
.field.wide { grid-column: 1 / -1; grid-row: auto; display: block; }
.field.wide .check { margin: 0; }
.field[hidden] { display: none; }
.fields > .hint { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .field { display: block; }
  .field > label { margin-bottom: 6px; }
  .field > .hint { margin-top: 6px; }
}
fieldset { border: 0; border-top: 1px solid var(--line); padding: 18px 0 0; margin: 0 0 6px; min-width: 0; }
fieldset:first-child { border-top: 0; padding-top: 0; }
legend { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; padding: 0; margin-bottom: 14px; float: left; width: 100%; }
legend + * { clear: both; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 6px 0; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--brand); }

/* postcode checker */
.checker { margin-top: 22px; }
.checker form { display: flex; gap: 10px; flex-wrap: wrap; }
.checker input { flex: 1 1 220px; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
.result { margin-top: 18px; }
.result:empty { display: none; }
.big-date { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; line-height: 1.15; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.fact { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.fact b { display: block; font-size: 1.15rem; }
.fact span { color: var(--muted); font-size: .85rem; }
.notice { border-left: 4px solid var(--warn); background: var(--warn-soft); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 14px 0; }
.notice.info { border-color: var(--brand); background: var(--brand-soft); }
.notice.bad { border-color: var(--bad); background: var(--bad-soft); }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tr.now td { background: var(--brand-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* pills and progress */
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.ok, .pill.ready, .pill.registered { background: var(--ok-soft); color: var(--ok); }
.pill.warn, .pill.attention { background: var(--bad-soft); color: var(--bad); }
.pill.todo, .pill.gathering { background: var(--warn-soft); color: var(--warn); }
.pill.na, .pill.not-let { background: var(--na-soft); color: var(--na); }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* readiness sheet */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.prop { margin-bottom: 16px; }
.prop-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.prop-head h3 { margin: 0; margin-right: auto; font-size: 1.25rem; }
.prop-meta { color: var(--muted); font-size: .92rem; margin: 4px 0 12px; }
.items { list-style: none; padding: 0; margin: 12px 0 0; }
.items li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); margin: 0; align-items: start; }
.items .note { color: var(--muted); font-size: .9rem; display: block; }
.dates { list-style: none; padding: 0; margin: 0; }
.dates li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); margin: 0; }
.dates li:first-child, .items li:first-child { border-top: 0; }
.dates .soon { color: var(--bad); font-weight: 700; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 18px 0 14px; }
.toolbar > .btn:first-child { margin-right: 8px; }
.toolbar .btn { justify-content: center; }
@media (max-width: 620px) {
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar > .btn:first-child { grid-column: 1 / -1; margin-right: 0; }
  .toolbar .btn.small { min-height: 42px; }
}
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 0; width: min(820px, 96vw); max-height: 92vh; box-shadow: var(--shadow); overflow: hidden; }
dialog[open] { display: flex; }
dialog > form { display: flex; flex-direction: column; min-height: 0; width: 100%; }
dialog::backdrop { background: rgba(10,14,20,.55); }
.dlg-head, .dlg-foot { padding: 14px 24px; display: flex; gap: 10px; align-items: center; background: var(--surface); flex: none; }
.dlg-head { top: 0; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; margin-right: auto; font-size: 1.3rem; }
.dlg-foot { bottom: 0; border-top: 1px solid var(--line); justify-content: flex-end; }
.dlg-body { padding: 22px 24px 8px; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.dlg-body > .hint { margin: 4px 0 14px; }
.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; display: flex; gap: 14px; align-items: center; z-index: 50; box-shadow: var(--shadow); }
.toast button { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* prose pages */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.source { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2.2em; padding-top: 1em; }
.cols { columns: 3 220px; column-gap: 28px; list-style: none; padding: 0; }
.cols li { break-inside: avoid; }
.cta { background: var(--brand-soft); border-radius: var(--radius); padding: 22px; margin: 28px 0; }
.cta h2, .cta h3 { margin-top: 0; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding: 30px 0 40px; font-size: .92rem; color: var(--muted); }
.site-foot .cols-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; margin-bottom: 18px; }
.site-foot h4 { margin: 0 0 8px; color: var(--ink); font-size: .95rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot a { color: var(--muted); }

.print-only { display: none; }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .items li, .dates li { grid-template-columns: 1fr; gap: 2px; }
  .hero { padding-top: 30px; }
}
@media (max-width: 620px) {
  .site-head .wrap { gap: 6px 12px; padding-top: 8px; padding-bottom: 8px; }
  .brand { font-size: 1.02rem; }
  .brand svg { width: 26px; height: 26px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; margin: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav { justify-content: space-between; gap: 0; }
  .nav a { white-space: nowrap; padding: 6px 4px; font-size: min(.84rem, 3.3vw); }
  html { scroll-padding-top: 104px; }
  .toolbar > [data-act="restore-file"] { grid-column: 1 / -1; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --ink: #000; --muted: #333; --line: #bbb; --shadow: none; }
  .site-head, .site-foot, .indie, .toolbar, .no-print, .toast, .crumbs, .btn, .to-top { display: none !important; }
  .print-only { display: block; }
  body { font-size: 11.5pt; }
  .card { box-shadow: none; border-color: #999; break-inside: avoid; }
  .prop { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
