/* deliriumadfinem.com: calm, large type, high contrast, dark mode follows the system. */
:root {
  --bg: #f7f4ef; --surface: #fffdf9; --soft: #efe9df; --ink: #1d2126; --muted: #4f565e; --line: #d9d0c3;
  --accent: #2f5279; --accent-ink: #ffffff; --link: #2b5584; --sage: #46685a; --sage-soft: #e3ece5;
  --now: #9a4527; --now-ink: #ffffff; --now-soft: #f6e6dd; --warn-soft: #fbf1dc; --warn-line: #d9b46a;
  --lamp: #f0c36d; --skyc: #dfe6ef; --moonc: #f4e7c8; --shadow: 0 1px 2px rgba(30,30,30,.06), 0 4px 16px rgba(30,30,30,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121417; --surface: #1a1d21; --soft: #22262b; --ink: #e8e4dc; --muted: #aab0b6; --line: #343a41;
    --accent: #9db8d9; --accent-ink: #10141a; --link: #a9c4e6; --sage: #a3c7b1; --sage-soft: #1f2a24;
    --now: #e2a283; --now-ink: #1b120d; --now-soft: #2c211c; --warn-soft: #2a2418; --warn-line: #7d6634;
    --lamp: #f0c36d; --skyc: #1e2836; --moonc: #efe2c0; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121417; --surface: #1a1d21; --soft: #22262b; --ink: #e8e4dc; --muted: #aab0b6; --line: #343a41;
  --accent: #9db8d9; --accent-ink: #10141a; --link: #a9c4e6; --sage: #a3c7b1; --sage-soft: #1f2a24;
  --now: #e2a283; --now-ink: #1b120d; --now-soft: #2c211c; --warn-soft: #2a2418; --warn-line: #7d6634;
  --lamp: #f0c36d; --skyc: #1e2836; --moonc: #efe2c0; --shadow: none; color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.1875rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow-wrap: break-word; }
h1, h2, h3, .brand span { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.22; letter-spacing: -.005em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.7rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.45rem, 1.25rem + .9vw, 1.8rem); margin: 1.9em 0 .5em; }
h3 { font-size: 1.25rem; margin: 1.5em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5em 1em; z-index: 50; }
.skip:focus { left: 8px; }
.small, .small a { font-size: .9rem; color: var(--muted); }

/* header: sticky on every screen, Right now always one tap away */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar { max-width: 72rem; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; margin-right: auto; min-width: 0; }
.brand span { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand i { font-weight: 500; color: var(--muted); }
.now-btn { background: var(--now); color: var(--now-ink); text-decoration: none; font-weight: 650; padding: .5em 1em; border-radius: 999px; font-size: 1rem; white-space: nowrap; line-height: 1.2; }
.now-btn.is-here { outline: 2px solid var(--now); outline-offset: 2px; }
.icon-btn { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.no-js .js-only { display: none !important; }
.menu ul { list-style: none; margin: 0 auto; padding: 0 16px 10px; max-width: 72rem; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.menu a { color: var(--ink); text-decoration: none; font-size: 1rem; padding: .25em 0; display: inline-block; border-bottom: 2px solid transparent; }
.menu a[aria-current] { border-bottom-color: var(--accent); }
.js .menu { display: none; }
.js .menu.open { display: block; }
.js .menu.open ul { flex-direction: column; gap: 0; padding-bottom: 14px; }
.js .menu.open a { display: block; padding: .55em 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) {
  .js .menu { display: block; }
  .js .menu ul, .js .menu.open ul { flex-direction: row; gap: 4px 20px; padding-bottom: 8px; }
  .js .menu.open a { display: inline-block; padding: .25em 0; border-bottom: 2px solid transparent; }
  .js .menu a[aria-current] { border-bottom-color: var(--accent); }
  #menu-btn { display: none !important; }
}
@media (max-width: 480px) { .brand i { display: none; } }
@media (max-width: 360px) { .brand span { font-size: 1.05rem; } .now-btn { padding: .5em .8em; } }

/* hero (home) */
.hero { background: linear-gradient(180deg, var(--soft), var(--bg)); border-bottom: 1px solid var(--line); }
.hero-in { max-width: 72rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 22px; padding-bottom: 26px; }
.hero h1 { margin-top: .1em; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; color: var(--sage); font-weight: 650; margin: 0; }
.hero-lede p { font-size: 1.22rem; }
.hero-art { display: none; }
@media (min-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
  .hero-art { display: block; }
}
.window-art { width: 100%; height: auto; }
.window-art .sky { fill: var(--skyc); }
.window-art .moon { fill: var(--moonc); }
.window-art .sky-cut { fill: var(--skyc); }
.window-art .stars { fill: var(--moonc); }
.window-art .frame { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.window-art .thin { stroke-width: 2; }
.window-art .hill { fill: none; stroke: var(--sage); stroke-width: 2.5; stroke-linecap: round; }
.window-art .lamp, .window-art .cup { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; opacity: .75; }

.btn { display: inline-block; padding: .7em 1.2em; border-radius: 12px; text-decoration: none; font-weight: 650; line-height: 1.25; margin: 0 .4em .5em 0; border: 2px solid transparent; font-size: 1.05rem; cursor: pointer; font-family: inherit; }
.btn-now { background: var(--now); color: var(--now-ink); }
.btn-quiet { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-main { background: var(--accent); color: var(--accent-ink); }

/* page */
main { padding-top: 14px; padding-bottom: 48px; }
.crumbs { font-size: .92rem; color: var(--muted); margin: 6px 0 0; }
.crumbs a { color: var(--muted); }
.page-head { margin-bottom: 1.2em; }
.lede { font-size: 1.25rem; color: var(--ink); }
.notice { font-size: .92rem; color: var(--muted); border-left: 3px solid var(--line); padding: .1em 0 .1em .8em; margin: .6em 0 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .8em 1.1em; margin: 0 0 1.6em; }
.toc p { margin: 0 0 .3em; font-weight: 650; font-size: .95rem; color: var(--muted); }
.toc ul { margin: 0; padding-left: 1.1em; }
.toc li { margin: .15em 0; }
.prose li { margin: .3em 0; }
.prose li > p { margin: 0 0 .4em; }
.prose strong, strong, b { font-weight: 700; }
.prose blockquote { margin: 1.2em 0; padding: .6em 1em; border-left: 4px solid var(--sage); background: var(--sage-soft); border-radius: 0 12px 12px 0; }
.prose blockquote p:last-child { margin: 0; }
sup.cite { font-size: .68em; line-height: 0; white-space: nowrap; }
sup.cite a { text-decoration: none; color: var(--muted); padding: 0 .05em; }
sup.cite a:hover { color: var(--link); text-decoration: underline; }

/* boxes used inside Markdown */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1em 1.2em; margin: 1.3em 0; box-shadow: var(--shadow); }
.box > :last-child { margin-bottom: 0; }
.box > h2:first-child, .box > h3:first-child { margin-top: 0; }
.box.now { background: var(--now-soft); border-color: color-mix(in srgb, var(--now) 40%, var(--line)); }
.box.calm { background: var(--sage-soft); border-color: color-mix(in srgb, var(--sage) 35%, var(--line)); }
.box.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: .1em 0 .2em 3em; margin: 0 0 1em; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: .05em; width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 1.8em; }
.ticks li::before { content: ""; position: absolute; left: .2em; top: .55em; width: .8em; height: .45em; border-left: 2.5px solid var(--sage); border-bottom: 2.5px solid var(--sage); transform: rotate(-45deg); }

/* tables scroll inside themselves on phones */
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: .6em .75em; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.prose > table { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }

/* helplines */
.country-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: .4em 0 1em; }
.country-pick button { font: inherit; font-size: .95rem; padding: .4em .85em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.country-pick button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lines { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 1em 0 1.4em; }
@media (min-width: 700px) { .lines { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.line { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .85em 1em; }
.line p { margin: 0 0 .3em; }
.line-name { font-weight: 650; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.line .cc { font-weight: 400; font-size: .85rem; color: var(--muted); }
.line-num { font-size: 1.45rem; font-weight: 700; }
.line-num .or { font-size: 1rem; font-weight: 400; color: var(--muted); }
.line-for { font-size: 1rem; }
.line-meta { font-size: .85rem; color: var(--muted); }
.line-meta a { color: var(--muted); }
a.tel { white-space: nowrap; font-weight: 700; }
[data-country][data-hide] { display: none; }

/* cards (child pages): fixed 2 / 1 columns, centred odd last card */
.cards { list-style: none; padding: 0; margin: 1.8em 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cards li { flex: 1 1 100%; display: flex; }
@media (min-width: 700px) { .cards li { flex: 0 1 calc(50% - 6px); } }
.cards a { flex: 1; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1em 1.1em; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.cards a:hover { border-color: var(--accent); }
.cards strong { display: block; color: var(--link); font-size: 1.1rem; margin-bottom: .2em; }
.cards span { font-size: 1rem; color: var(--muted); }

/* home paths */
.paths { list-style: none; padding: 0; margin: 1.4em 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 700px) { .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.paths a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1em; text-decoration: none; color: var(--ink); height: 100%; box-shadow: var(--shadow); }
.paths a:hover { border-color: var(--accent); }
.paths svg { grid-row: span 2; width: 40px; height: 40px; color: var(--sage); }
.paths strong { color: var(--link); font-size: 1.12rem; }
.paths span { font-size: 1rem; color: var(--muted); }

.related { margin: 2.4em 0 0; padding-top: 1em; border-top: 1px solid var(--line); }
.related h2 { margin-top: .4em; font-size: 1.3rem; }
.related ul { padding-left: 1.1em; }
.sources { margin-top: 2.6em; padding-top: 1em; border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.sources h2 { font-size: 1.15rem; margin-top: .4em; color: var(--ink); }
.sources ol { padding-left: 1.4em; }
.sources li { margin: .35em 0; }
.sources li:target { background: var(--warn-soft); border-radius: 6px; }
.sources a { color: var(--link); }

/* forms and tools */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1em 1.1em; margin: 1.4em 0; }
.tool label { display: block; font-weight: 600; font-size: 1rem; margin: .7em 0 .25em; }
.tool input[type=text], .tool input[type=tel], .tool input[type=time], .tool input[type=datetime-local], .tool textarea, .tool select { width: 100%; font: inherit; font-size: 1.05rem; padding: .55em .7em; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.tool textarea { min-height: 4.5em; resize: vertical; }
.tool .row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
@media (min-width: 640px) { .tool .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tool .actions { margin-top: 1em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: .3em 0; }
.chips label { font-weight: 400; margin: 0; display: inline-flex; align-items: center; gap: .35em; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: .3em .8em; font-size: .98rem; cursor: pointer; }
.chips input { width: 1.05em; height: 1.05em; accent-color: var(--accent); }
.checklist { list-style: none; padding: 0; }
.checklist li { margin: 0; border-bottom: 1px solid var(--line); }
.checklist label { display: flex; gap: .7em; align-items: flex-start; padding: .55em 0; cursor: pointer; font-weight: 400; margin: 0; font-size: 1.08rem; }
.checklist input { width: 1.35em; height: 1.35em; margin-top: .2em; accent-color: var(--sage); flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--sage); }
.script { background: var(--bg); border: 1.5px dashed var(--line); border-radius: 12px; padding: 1em; }
.script p { margin: 0 0 .6em; }
.fill { background: var(--warn-soft); border-bottom: 1.5px solid var(--warn-line); padding: 0 .2em; border-radius: 3px; }
.fill:empty, .blank { display: inline-block; min-width: 7em; height: 1.1em; vertical-align: -.2em; }
.blank { border-bottom: 1.5px solid var(--muted); }
.tool > h3:first-child { margin-top: 0; }
.table-wrap table:has(th:nth-child(3)) { min-width: 32rem; }
.log-table td, .log-table th { font-size: .98rem; }
.table-cap { margin: 1.2em 0 -.6em; }
.log-blank td { height: 3.2em; }
.glossary-filter { width: 100%; font: inherit; padding: .6em .8em; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); margin: .2em 0 1em; }
dl.glossary dt { font-weight: 700; margin-top: 1em; font-size: 1.1rem; }
dl.glossary dd { margin: .2em 0 0; }

/* breathing guide (self-care) */
.breathe { display: grid; place-items: center; gap: 10px; margin: 1.4em 0; }
.breathe .ring { width: 150px; height: 150px; border-radius: 50%; border: 3px solid var(--sage); display: grid; place-items: center; background: var(--sage-soft); }
.breathe .ring span { font-size: 1.1rem; color: var(--sage); font-weight: 650; }
.breathe.on .ring { animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.72); } 40%, 50% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .breathe.on .ring { animation: none; } * { scroll-behavior: auto !important; } }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--soft); padding: 28px 0 36px; font-size: .95rem; color: var(--muted); }
.foot .disclaimer { color: var(--ink); }
.foot a { color: var(--muted); }
.foot-small { font-size: .85rem; }

/* review pack */
.review .rv-page h2 { font-size: 1.3rem; }
.rv-list { padding-left: 1.6em; }
.rv { margin: 0 0 1.1em; padding-bottom: .8em; border-bottom: 1px solid var(--line); font-size: 1rem; }
.rv p { margin: 0 0 .3em; }
.rv-ctx { font-style: italic; }
.rv-ctx .box { display: inline-block; width: 1em; height: 1em; border: 1.5px solid var(--ink); border-radius: 3px; margin: 0 .5em 0 0; padding: 0; vertical-align: -.1em; box-shadow: none; background: transparent; }
.rv-src { font-size: .92rem; color: var(--muted); margin: 0 0 .3em; padding-left: 1.1em; }
.rv-comment { color: var(--muted); border-bottom: 1px dotted var(--muted); padding-bottom: 1.6em; }

/* print: the log, the phrase sheet and the review pack print as clean sheets */
@media print {
  :root { --bg: #fff; --surface: #fff; --soft: #fff; --ink: #000; --muted: #333; --line: #999; --link: #000; }
  body { font-size: 11.5pt; background: #fff; color: #000; }
  .top, .crumbs, .toc, .related, .js-only, .country-pick, .no-print, .skip, .hero-art, .cards, .tool .actions, .foot-links { display: none !important; }
  .foot { background: #fff; padding: 8px 0 0; border-top: 1px solid #999; }
  .foot-small { display: none; }
  a { color: #000; text-decoration: none; }
  .box, .tool, .line { box-shadow: none; break-inside: avoid; }
  h2 { break-after: avoid; }
  .printable .sources { font-size: 9pt; }
  .log-blank td { height: 2.4em; }
  main { padding: 0; }
  .wrap { max-width: none; }
  sup.cite { display: none; }
  .rv { break-inside: avoid; }
}
