/* Eco Sleep Center: Night Log design. Prefix nl- on all classes. */
:root {
  --nl-night: oklch(22% 0.03 255);
  --nl-night-2: oklch(27% 0.035 255);
  --nl-night-3: oklch(33% 0.04 255);
  --nl-linen: oklch(96% 0.012 85);
  --nl-linen-2: oklch(92% 0.015 85);
  --nl-ink: oklch(24% 0.03 255);
  --nl-ink-soft: oklch(40% 0.03 255);
  --nl-moon: oklch(93% 0.02 85);
  --nl-moon-soft: oklch(78% 0.02 85);
  --nl-gold: oklch(80% 0.14 80);
  --nl-gold-deep: oklch(50% 0.11 70);
  --nl-link: oklch(38% 0.11 255);
  --nl-rule: oklch(82% 0.015 85);
  --nl-rule-d: oklch(40% 0.035 255);
  --nl-focus: oklch(70% 0.15 80);
  --nl-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --nl-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nl-mono: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--nl-linen); color: var(--nl-ink); font-family: var(--nl-body); font-size: 1.0625rem; line-height: 1.7; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--nl-link); text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
a:hover { color: var(--nl-night); }
:focus-visible { outline: 3px solid var(--nl-focus); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--nl-display); font-weight: 400; line-height: 1.1; margin: 0 0 0.5em; overflow-wrap: anywhere; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.3rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-top: 1.6em; }
h3 { font-size: 1.45rem; font-family: var(--nl-body); font-weight: 600; letter-spacing: 0; line-height: 1.3; margin-top: 1.4em; }
p, li { max-width: 68ch; }
.nl-wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.nl-measure { max-width: 42rem; }
.nl-skip { position: absolute; left: -999px; top: 0; background: var(--nl-gold); color: var(--nl-night); padding: 0.6rem 1rem; z-index: 100; }
.nl-skip:focus { left: 0.5rem; top: 0.5rem; }
.nl-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* top mark and dial menu */
.nl-top { background: var(--nl-night); color: var(--nl-moon); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--nl-rule-d); }
.nl-top-in { display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; }
.nl-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--nl-moon); text-decoration: none; font-family: var(--nl-display); font-size: 1.45rem; line-height: 1; }
.nl-brand:hover { color: var(--nl-gold); }
.nl-menu-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: transparent; color: var(--nl-moon); border: 1px solid var(--nl-rule-d); border-radius: 999px; padding: 0.4rem 0.95rem; font: 500 0.85rem var(--nl-mono); cursor: pointer; }
.nl-menu-btn:hover { border-color: var(--nl-gold); color: var(--nl-gold); }
.nl-sheet { position: fixed; inset: 0; background: var(--nl-night); color: var(--nl-moon); z-index: 60; overflow-y: auto; display: none; }
.nl-sheet.is-open { display: block; }
.nl-sheet-in { width: min(100% - 2rem, 70rem); margin-inline: auto; padding-bottom: 3rem; }
.nl-sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; }
.nl-sheet-body { display: grid; gap: 2rem; align-items: start; margin-top: 1rem; }
.nl-dial { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.nl-dial-ring { display: none; }
.nl-dial-item { display: flex; gap: 0.7rem; align-items: baseline; padding: 0.7rem 0.8rem; border: 1px solid var(--nl-rule-d); border-radius: 0.6rem; color: var(--nl-moon); text-decoration: none; }
.nl-dial-item:hover, .nl-dial-item[aria-current="page"] { border-color: var(--nl-gold); color: var(--nl-gold); }
.nl-hr { font: 500 0.78rem var(--nl-mono); color: var(--nl-gold); }
.nl-lb { font-size: 0.98rem; }
.nl-sheet-guides h2 { font-size: 1.6rem; margin-top: 0; color: var(--nl-moon); }
.nl-sheet-guides ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.nl-sheet-guides li { border-bottom: 1px solid var(--nl-rule-d); }
.nl-sheet-guides a { display: block; padding: 0.6rem 0; color: var(--nl-moon); text-decoration: none; }
.nl-sheet-guides a:hover, .nl-sheet-guides a[aria-current="page"] { color: var(--nl-gold); }
.nl-sheet-guides p a { display: inline; margin-right: 1rem; color: var(--nl-moon-soft); font-size: 0.9rem; }
@media (min-width: 760px) {
  .nl-sheet-body { grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); gap: 3rem; }
  .nl-dial { display: block; position: relative; width: 100%; aspect-ratio: 1; }
  .nl-dial-ring { display: block; position: absolute; inset: 9%; border: 1px solid var(--nl-rule-d); border-radius: 50%; }
  .nl-dial-ring::after { content: ""; position: absolute; inset: 22%; border: 1px dashed var(--nl-rule-d); border-radius: 50%; }
  .nl-dial-item { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); flex-direction: column; align-items: center; gap: 0.1rem; background: var(--nl-night); padding: 0.4rem 0.55rem; text-align: center; min-width: 5.4rem; }
  .nl-lb { font-size: 0.82rem; line-height: 1.2; }
}

/* shared bands */
.nl-dark { background: var(--nl-night); color: var(--nl-moon); }
.nl-dark a { color: var(--nl-gold); }
.nl-dark a:hover { color: var(--nl-moon); }
.nl-crumbs { font: 400 0.8rem var(--nl-mono); color: var(--nl-moon-soft); margin: 0 0 1rem; }
.nl-crumbs a { color: var(--nl-moon-soft); }
.nl-hero { padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(2.2rem, 5vw, 3.5rem); }
.nl-hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 880px) { .nl-hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; } }
.nl-lede { font-size: 1.2rem; color: var(--nl-moon-soft); max-width: 36rem; }
.nl-plate { margin: 0; }
.nl-plate img { display: block; width: 100%; height: auto; border-radius: 999px 999px 0.8rem 0.8rem; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--nl-rule-d); }
.nl-hero-plate img { border-radius: 0.8rem 0.8rem 0.8rem 9rem; }
.nl-plate.is-band img { border-radius: 0.8rem; aspect-ratio: 21 / 8; }
.nl-btn { display: inline-block; background: var(--nl-gold); color: var(--nl-night); border: 0; border-radius: 999px; padding: 0.75rem 1.5rem; font: 600 1rem var(--nl-body); text-decoration: none; cursor: pointer; }
.nl-btn:hover { background: var(--nl-moon); color: var(--nl-night); }
.nl-btn:disabled { opacity: 0.6; }

/* home: overnight timeline, dark to linen */
.nl-hero-home { padding-bottom: 1rem; }
.nl-hero-home h1 { max-width: 14ch; }
.nl-night { background: color-mix(in oklch, var(--nl-linen) calc(var(--t) * 100%), var(--nl-night)); position: relative; }
.nl-night.is-dark { color: var(--nl-moon); }
.nl-night.is-dark a { color: var(--nl-gold); }
.nl-night.is-dark .nl-soft { color: var(--nl-moon-soft); }
.nl-night.is-light { color: var(--nl-ink); }
.nl-night.is-light .nl-soft { color: var(--nl-ink-soft); }
.nl-row { display: grid; gap: 0.6rem 2rem; padding: clamp(1.8rem, 5vw, 3.2rem) 0; border-top: 1px solid color-mix(in oklch, currentColor 22%, transparent); }
@media (min-width: 820px) { .nl-row { grid-template-columns: 11rem minmax(0, 1fr); } }
.nl-time { font: 500 1.7rem var(--nl-mono); letter-spacing: -0.02em; display: flex; flex-direction: column; gap: 0.15rem; }
.nl-time small { font: 400 0.8rem var(--nl-mono); opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; }
.nl-time svg { margin-bottom: 0.4rem; }
.nl-row h2 { margin-top: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.nl-row .nl-chips a { color: inherit; }
.nl-row-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.nl-row-links a { font-weight: 600; }
.nl-home-grid { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .nl-home-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* content sections */
.nl-section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.nl-prose h2:first-child { margin-top: 0.6em; }
.nl-prose { padding: clamp(1.6rem, 4vw, 2.6rem) 0 1rem; }
.nl-prose p, .nl-prose li { max-width: 40rem; }
.nl-prose ul, .nl-prose ol { padding-left: 1.2rem; }
.nl-prose li { margin-bottom: 0.4rem; }
.nl-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1rem 0; max-width: none; }
.nl-chips li { max-width: none; margin: 0; }
.nl-chips a { display: inline-block; border: 1px solid var(--nl-rule); border-radius: 999px; padding: 0.35rem 0.9rem; text-decoration: none; font-size: 0.95rem; background: var(--nl-linen-2); }
.nl-chips a:hover { border-color: var(--nl-gold-deep); }
.nl-faq h3 { border-top: 1px solid var(--nl-rule); padding-top: 1rem; }
.nl-refs { margin: 2.5rem 0 3rem; padding-top: 1rem; border-top: 1px solid var(--nl-rule); font-size: 0.9rem; }
.nl-refs h2 { font-size: 1.3rem; margin-top: 0; }
.nl-refs ol { columns: 2 16rem; padding-left: 1.2rem; }
.nl-refs li { max-width: none; margin: 0 0 0.25rem; }
.nl-next { margin-top: 2rem; }
.nl-note { font-size: 0.88rem; color: var(--nl-ink-soft); }
.nl-callout { border-left: 4px solid var(--nl-gold-deep); background: var(--nl-linen-2); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 0.6rem 0.6rem 0; }
.nl-callout p { margin: 0; }
.nl-glossary dt { font-weight: 700; margin-top: 1rem; }
.nl-glossary dd { margin: 0.1rem 0 0; max-width: 40rem; }

/* sleep diary strip (area pages) */
.nl-diary { display: grid; gap: 0; margin: 0; border: 1px solid var(--nl-rule-d); border-radius: 0.7rem; overflow: hidden; }
@media (min-width: 760px) { .nl-diary { grid-template-columns: repeat(3, 1fr); } }
.nl-diary div { padding: 0.9rem 1.1rem; background: var(--nl-night-2); border-bottom: 1px solid var(--nl-rule-d); }
@media (min-width: 760px) { .nl-diary div { border-bottom: 0; border-right: 1px solid var(--nl-rule-d); } .nl-diary div:last-child { border-right: 0; } }
.nl-diary dt { font: 500 0.74rem var(--nl-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--nl-gold); }
.nl-diary dd { margin: 0.25rem 0 0; font-size: 0.98rem; color: var(--nl-moon); }

/* directory log table */
.nl-logwrap { margin: 1.5rem 0; }
.nl-log { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.nl-log th, .nl-log td { text-align: left; padding: 0.9rem 0.8rem; border-top: 1px solid var(--nl-rule); vertical-align: top; }
.nl-log thead th { font: 500 0.76rem var(--nl-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--nl-ink-soft); border-top: 2px solid var(--nl-ink); }
.nl-log tbody tr:last-child th, .nl-log tbody tr:last-child td { border-bottom: 2px solid var(--nl-ink); }
.nl-log address { font-style: normal; }
.nl-no { font-family: var(--nl-mono); color: var(--nl-gold-deep); width: 3.2rem; }
.nl-cname { font-family: var(--nl-display); font-size: 1.4rem; font-weight: 400; line-height: 1.15; }
.nl-log tbody th { font-weight: 400; }
@media (max-width: 780px) {
  .nl-log thead { position: absolute; left: -9999px; }
  .nl-log, .nl-log tbody, .nl-log tr, .nl-log td, .nl-log tbody th { display: block; width: 100%; }
  .nl-log tr { border-top: 2px solid var(--nl-ink); padding: 0.6rem 0; }
  .nl-log th, .nl-log td { border: 0; padding: 0.25rem 0; }
  .nl-log td[data-label]::before, .nl-log th[data-label]::before { content: attr(data-label); display: block; font: 500 0.7rem var(--nl-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--nl-ink-soft); }
  .nl-log tbody tr:last-child th, .nl-log tbody tr:last-child td { border-bottom: 0; }
  .nl-no { width: auto; }
}
.nl-method { background: var(--nl-linen-2); border-radius: 0.7rem; padding: 1rem 1.25rem; font-size: 0.95rem; }
.nl-method p { margin: 0; max-width: none; }

/* community block */
.nl-community { margin: 2.5rem 0; padding: 1.5rem 1.6rem; background: var(--nl-night); color: var(--nl-moon); border-radius: 0.9rem; border-top: 4px solid var(--nl-gold); }
.nl-community h2 { margin-top: 0; font-size: 1.9rem; color: var(--nl-moon); }
.nl-community h3 { color: var(--nl-gold); font-size: 1.1rem; margin-top: 1.1rem; }
.nl-community a { color: var(--nl-gold); }
.nl-community p { max-width: 60ch; }
.nl-community address { font: 400 0.85rem var(--nl-mono); font-style: normal; color: var(--nl-moon-soft); }
.nl-entry { margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--nl-rule-d); }
.nl-entry p { margin: 0 0 0.3rem; }
.nl-entry:last-child { border-bottom: 0; margin-bottom: 0; }

/* form, map, contact */
.nl-grid-2 { display: grid; gap: 2rem; }
@media (min-width: 860px) { .nl-grid-2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.nl-form { background: var(--nl-linen-2); border: 1px solid var(--nl-rule); border-radius: 0.9rem; padding: 1.5rem; }
.nl-form h2 { margin-top: 0; font-size: 2rem; }
.nl-form label { display: block; font-weight: 600; margin: 0 0 1rem; }
.nl-form input[type=text], .nl-form input[type=email], .nl-form textarea { display: block; width: 100%; margin-top: 0.3rem; padding: 0.7rem 0.8rem; font: 400 1rem var(--nl-body); border: 1px solid oklch(65% 0.02 255); border-radius: 0.5rem; background: #fff; color: var(--nl-ink); }
.nl-map { border: 1px solid var(--nl-rule); border-radius: 0.8rem; overflow: hidden; margin: 1rem 0; background: var(--nl-linen-2); }
.nl-map iframe { display: block; width: 100%; height: 320px; border: 0; }
.nl-addr { font-style: normal; font-size: 1.1rem; }

/* clock progress mark (guides) */
.nl-clock { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; opacity: 0.92; filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.25)); }
@media (max-width: 520px) { .nl-clock { right: 0.6rem; bottom: 0.6rem; transform: scale(0.8); transform-origin: bottom right; } }
@media print { .nl-clock, .nl-top, .nl-sheet { display: none; } }

/* footer: quiet night band */
.nl-footer { background: var(--nl-night); color: var(--nl-moon); padding: 3rem 0 2rem; margin-top: 3rem; position: relative; overflow: hidden; }
.nl-stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 12% 20%, oklch(90% 0.02 85 / 0.7), transparent), radial-gradient(1px 1px at 38% 62%, oklch(90% 0.02 85 / 0.5), transparent), radial-gradient(1.5px 1.5px at 64% 28%, oklch(90% 0.02 85 / 0.6), transparent), radial-gradient(1px 1px at 82% 70%, oklch(90% 0.02 85 / 0.5), transparent), radial-gradient(1px 1px at 92% 18%, oklch(90% 0.02 85 / 0.6), transparent); pointer-events: none; }
.nl-footer .nl-wrap { position: relative; }
.nl-footer a { color: var(--nl-moon); text-decoration-color: var(--nl-rule-d); }
.nl-footer a:hover { color: var(--nl-gold); }
.nl-footer h2 { font-size: 1.3rem; margin: 0 0 0.7rem; color: var(--nl-gold); }
.nl-foot-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .nl-foot-grid { grid-template-columns: repeat(3, 1fr); } }
.nl-footer ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.nl-footer li { margin-bottom: 0.3rem; }
.nl-footer address { font-style: normal; margin-bottom: 0.8rem; color: var(--nl-moon-soft); }
.nl-fine { border-top: 1px solid var(--nl-rule-d); margin-top: 2rem; padding-top: 1rem; font-size: 0.85rem; color: var(--nl-moon-soft); max-width: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.nl-guidelist { list-style: none; padding: 0; }
.nl-guidelist li { border-top: 1px solid var(--nl-rule); padding: 0.4rem 0; }
.nl-guidelist h3 { margin: 0.2rem 0; font-family: var(--nl-display); font-size: 1.7rem; font-weight: 400; }
.nl-dark a.nl-btn, .nl-night a.nl-btn { color: var(--nl-night); }
.nl-dark a.nl-btn:hover { color: var(--nl-night); }
.nl-page-home .nl-footer { margin-top: 0; }
.nl-log td[data-label="Phone"] { white-space: nowrap; }
.nl-facts th { width: 11rem; font: 500 0.76rem var(--nl-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--nl-ink-soft); }
.nl-facts td { font-size: 1.05rem; }
.nl-cname a { color: inherit; text-decoration-color: var(--nl-gold-deep); }
.nl-sheet-guides h2 + ul { margin-bottom: 1.4rem; }
.nl-sheet-guides h2:not(:first-child) { margin-top: 1rem; }
@media (max-width: 780px) { .nl-facts th { width: auto; } }
