/* Gridleaf. Fury Goods family, with a dot-grid identity of its own. */
:root {
  color-scheme: light;
  --ink: #17322b;
  --paper: #f5f7f4;
  --card: #ffffff;
  --leaf: #2e6b4b;
  --leaf-light: #9fd3b5;
  --line: #cfd8d2;
  --muted: #4b5a53;
  --error: #b3261e;
  --focus: #c2570c;
  --band: #e8efe9;
  --note: #fff6dd;
  --field: #66736d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-wrap: anywhere; }
a { color: var(--leaf); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex='-1']:focus { outline: none; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
img, svg { max-width: 100%; }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: 0; left: .75rem; transform: translateY(-125%); padding: .65rem 1rem; background: var(--leaf-light); color: var(--ink); z-index: 5; }
.skip:focus { transform: translateY(0); }

/* header and footer */
.site-header, .site-footer { background: var(--ink); color: var(--paper); }
.site-header a, .site-footer a { color: inherit; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .25rem 1.5rem; }
.header-inner { min-height: 4.4rem; padding-block: .4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; text-decoration: none; font-weight: 760; font-size: 1.2rem; white-space: nowrap; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1.2rem; font-size: .95rem; }
.site-header nav a, .site-footer nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.site-header nav a:hover, .site-footer nav a:hover, .site-header nav a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: .13em; }
/* a row of dots: the site's signature */
.gridband { height: 14px; background-color: var(--ink); background-image: radial-gradient(circle, var(--leaf-light) 1.6px, transparent 2px); background-size: 14px 14px; background-position: 0 0; border-top: 1px solid var(--leaf); }
.footer-inner { min-height: 5rem; padding-block: 1rem; font-size: .92rem; }
.footer-inner p { max-width: 46rem; }
.footer-inner p a { display: inline-block; min-height: 24px; }

/* home */
.hero { background: var(--ink); color: var(--paper); }
.hero-inner { padding-block: clamp(2rem, 6vw, 4.5rem); }
.hero-inner h1 { max-width: 20ch; }
.hero-inner > p { max-width: 44rem; margin-top: 1.2rem; font-size: clamp(1.02rem, 1.6vw, 1.2rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero .btn.primary { background: var(--leaf-light); color: var(--ink); border-color: var(--leaf-light); }
.hero .btn.primary:hover { background: var(--paper); border-color: var(--paper); }
.hero .btn.ghost { background: transparent; color: var(--paper); border-color: var(--paper); }
.hero .btn.ghost:hover { background: var(--paper); color: var(--ink); }
.hero-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; margin: 1.6rem 0 0; padding: 0; list-style: none; max-width: 52rem; }
.hero-points li { padding-left: 1.4rem; position: relative; }
.hero-points li::before { content: ''; position: absolute; left: .15rem; top: .55em; width: .55rem; height: .55rem; background: var(--leaf-light); border-radius: 50%; }
.section { padding-block: clamp(2.2rem, 5vw, 4rem); display: grid; gap: 1rem; }
.section > section { display: grid; gap: 1rem; min-width: 0; }
.section-intro { max-width: 46rem; }
.band { background: var(--band); border-block: 1px solid var(--line); }
.two-col { grid-template-columns: 1fr 1fr; gap: 2rem clamp(2rem, 6vw, 5rem); }
.two-col h2 { margin-bottom: .2rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: .5rem; padding: 1.1rem 1.2rem 1.25rem; background-image: radial-gradient(circle, var(--line) 1px, transparent 1.4px); background-size: 12px 12px; background-position: right -2px top -2px; background-repeat: repeat-y; background-clip: padding-box; }
.card-title { font-family: inherit; font-size: 1.15rem; }
.card-title a { text-decoration: none; color: var(--ink); }
.card-title a::after { content: ''; position: absolute; inset: 0; }
.card:hover { border-color: var(--leaf); }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-title a:focus-visible { outline: none; }
.card p { margin-top: .45rem; color: var(--muted); }

/* tool pages */
.tool-hero { background: var(--ink); color: var(--paper); padding-block: clamp(1.2rem, 4vw, 2.4rem) clamp(1.5rem, 4vw, 2.2rem); }
.tool-hero a { color: var(--leaf-light); }
.crumbs { font-size: .9rem; margin-bottom: .6rem; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs li + li::before { content: '›'; padding-inline: .5rem; }
.crumbs a { display: inline-flex; min-height: 44px; align-items: center; }
.lede { margin-top: 1rem; max-width: 46rem; font-size: clamp(1rem, 1.5vw, 1.15rem); }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.tool-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: .6rem; padding: clamp(1rem, 2.5vw, 1.5rem); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem 1.25rem; min-width: 0; }
.form-grid .wide, .form-grid fieldset.sub { grid-column: 1 / -1; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; font-weight: 650; font-size: .95rem; }
fieldset.sub { border-top: 1px solid var(--line); padding-top: .8rem; }
fieldset.sub > legend { float: left; width: 100%; font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; margin-bottom: .5rem; }
fieldset.sub > .form-grid { clear: both; }
[hidden] { display: none !important; }
.field { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.field > label { font-weight: 650; font-size: .95rem; }
.hint { color: var(--muted); font-size: .9rem; }
.field-error { color: var(--error); font-weight: 650; font-size: .93rem; }
input[type='text'], input[type='date'], select {
  width: 100%; min-height: 44px; padding: .5rem .65rem; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid var(--field); border-radius: .35rem;
}
input[type='text']:focus, input[type='date']:focus, select:focus { border-color: var(--leaf); }
input[type='color'] { width: 4.5rem; min-height: 44px; padding: .2rem; background: #fff; border: 2px solid var(--field); border-radius: .35rem; cursor: pointer; }
.custom-colour { display: flex; align-items: center; gap: .75rem; margin-top: .3rem; }
.custom-colour label { font-weight: 650; font-size: .95rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; cursor: pointer; }
.check input { width: 1.5rem; height: 1.5rem; accent-color: var(--leaf); margin: 0; flex: none; }
.check-row { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.swatch { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1px solid var(--ink); }
.swatch-grey { background: #8a8a8a; }
.swatch-blue { background: #5b84b1; }
.swatch-green { background: #4f8a64; }
.swatch-black { background: #000000; }
[aria-invalid='true'] { border-color: var(--error) !important; box-shadow: 0 0 0 1px var(--error); }
.actions { display: grid; gap: .6rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.summary { font-weight: 650; }
.status:empty { display: none; }
.status { background: var(--note); border: 1px solid var(--leaf); padding: .7rem .9rem; border-radius: .4rem; }
.notice { background: var(--note); border: 1px solid var(--leaf); padding: .8rem 1rem; border-radius: .4rem; }
.error-summary { border: 3px solid var(--error); border-radius: .4rem; padding: .8rem 1rem; background: #fff; }
.error-summary h2 { color: var(--error); font-size: 1.2rem; font-family: inherit; }
.error-summary ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.error-summary a { color: var(--error); font-weight: 650; display: inline-block; min-height: 24px; }
.error-summary li + li { margin-top: .3rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1rem; font: inherit; font-weight: 650; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: .4rem; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--band); }
.btn.primary { background: var(--ink); color: var(--paper); font-size: 1.05rem; justify-self: start; padding-inline: 1.6rem; }
.btn.primary:hover { background: var(--leaf); border-color: var(--leaf); }

/* preview: a sheet of paper */
.preview { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.preview > h2 { font-size: 1.4rem; }
.preview-box { background: #d9e0dc; border-radius: .5rem; padding: clamp(.75rem, 2vw, 1.25rem); display: flex; justify-content: center; }
.preview-box svg, .preview-box img { display: block; width: auto; height: auto; max-width: 100%; max-height: 70vh; background: #fff; box-shadow: 0 2px 10px rgba(23, 50, 43, .25); }
.preview-box svg { width: 100%; }
.preview-box.is-stale { opacity: .55; }
.ready h3 { font-size: 1.05rem; }
.ready ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.ready a { display: inline-block; min-height: 24px; }

/* long-form pages */
.table-scroll { position: relative; max-width: 100%; overflow-x: auto; }
.table-scroll :is(th, td) { overflow-wrap: normal; }
.table-scroll:focus-visible { outline-offset: 2px; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--card); }
.data caption { text-align: left; font-weight: 700; padding-bottom: .4rem; }
.data th, .data td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--line); }
.data thead th { font-size: .85rem; color: var(--muted); border-bottom: 2px solid var(--ink); }
.prose { max-width: 50rem; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4.5rem); }
.prose.wide { max-width: 76rem; }
.prose section + section { margin-top: 2.2rem; }
.prose h2 { margin: 2rem 0 .8rem; }
.prose section > h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.4rem 0 .5rem; }
.prose p + p, .prose p + .table-scroll, .prose .table-scroll + p, .prose ul + p, .prose ol + p, .prose p + ul, .prose p + ol { margin-top: .9rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .4rem; }
.prose .crumbs ol { padding-left: 0; }
.prose .crumbs li + li { margin-top: 0; }
.prose .table-scroll { margin-block: 1rem; }
.prose .card-grid { margin-top: 1.5rem; }
.sources { font-size: .93rem; }
.sources a { display: inline-block; min-height: 24px; }
.related { columns: 2 16rem; }
.related li { break-inside: avoid; }
.related a { display: inline-flex; align-items: center; min-height: 44px; }
.prose .related li + li { margin-top: 0; }
.simple-top { min-height: 55vh; }
.simple-top h1 { margin-bottom: .6rem; }

@media (max-width: 64rem) {
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
  .preview-box svg, .preview-box img { max-height: 60vh; }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .hero-points { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 22rem) {
  .wrap { width: calc(100% - 1.25rem); }
  .brand span { font-size: 1rem; }
}

/* Google auto ads add <ins class="adsbygoogle"> or .google-auto-placed blocks between
   sections. Keep them full width inside grids and flex columns, inside the page
   width, and hide unfilled slots so they leave no gap. An ad injected inside the
   form or the preview is moved to the end, so it never splits the settings from
   the download button or the preview from its notes. */
.google-auto-placed, ins.adsbygoogle { max-width: 100%; grid-column: 1 / -1; clear: both; }
.google-auto-placed { margin-block: 1.5rem; overflow: hidden; }
ins.adsbygoogle[data-ad-status='unfilled'] { display: none !important; }
.tool-form > .google-auto-placed, .tool-form > ins.adsbygoogle, .preview > .google-auto-placed, .preview > ins.adsbygoogle { order: 99; }
iframe { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Printing a web page: the text only, no adverts, header bands or forms. The
   paper itself is printed from the PDF. */
@media print {
  .site-header nav, .skip, .gridband, .tool-form, .preview, .site-footer nav, .hero-cta, .google-auto-placed, ins.adsbygoogle { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .site-header, .site-footer, .tool-hero, .hero { background: #fff; color: #000; }
  .tool-layout { display: block; padding: 0; }
  .table-scroll { overflow: visible; }
  a { color: #000; }
}
