/* TinyDeskGuide — single stylesheet, mobile-first, system fonts, no external assets.
   Design system: deep-teal brand, full-bleed bands (hero / page heads / alt sections),
   spaced card grids, comfortable article measure. Zero external requests. */

:root {
  --ink: #1c2b33;
  --muted: #57707f;
  --accent: #0f766e;
  --accent-dark: #0b5952;
  --accent-deep: #07332e;
  --accent-bright: #14b8a6;
  --bg: #ffffff;
  --soft: #f2f7f6;
  --soft-2: #e7f2ef;
  --line: #dbe7e3;
  --line-strong: #c3d6d0;
  --radius: 14px;
  --radius-sm: 10px;
  --content: 1120px;
  --shadow-sm: 0 1px 2px rgba(11, 60, 54, 0.05), 0 6px 18px -10px rgba(11, 60, 54, 0.22);
  --shadow-md: 0 2px 4px rgba(11, 60, 54, 0.06), 0 18px 34px -16px rgba(11, 60, 54, 0.30);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #bfe6dd; }

img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px -8px rgba(11, 60, 54, 0.25);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--accent-deep);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo-mark { display: block; border-radius: 8px; }
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin-left: auto;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 550;
  padding: 7px 11px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { color: var(--accent-dark); background: var(--soft-2); }

/* ---------- Layout bands ---------- */
main.wrap { padding-bottom: 68px; }

/* Full-bleed band inside the centred .wrap column. */
.band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.band-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding-top: 52px; scroll-margin-top: 84px; }
.section > h2:first-child { margin-top: 0; }

.section-alt {
  background: linear-gradient(180deg, var(--soft) 0%, #ecf4f1 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 56px;
  padding-top: 50px;
  padding-bottom: 56px;
}
.section-alt .section { padding-top: 0; }

/* ---------- Type ---------- */
h1 { font-size: 2rem; line-height: 1.22; margin: 0 0 14px; letter-spacing: -0.015em; }
h2 { font-size: 1.5rem; line-height: 1.3; margin: 34px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 1.12rem; line-height: 1.35; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 7px; }
li::marker { color: var(--accent); }

:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

.lede { font-size: 1.13rem; line-height: 1.6; color: var(--muted); }

/* Reading-measure wrapper for prose pages and prose blocks. */
.prose { max-width: 46rem; }
.prose h2:first-child { margin-top: 40px; }

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  color: #e8f6f2;
  background:
    radial-gradient(58rem 26rem at 88% -20%, rgba(20, 184, 166, 0.38), rgba(20, 184, 166, 0) 60%),
    radial-gradient(40rem 20rem at -10% 120%, rgba(20, 184, 166, 0.20), rgba(20, 184, 166, 0) 55%),
    linear-gradient(118deg, var(--accent-deep) 0%, var(--accent-dark) 52%, var(--accent) 105%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25));
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--content);
  margin: 0 auto;
  padding: 66px 20px 74px;
}
.hero-glyph {
  position: absolute;
  right: -14px;
  bottom: -18px;
  width: 330px;
  max-width: 46vw;
  opacity: 0.09;
  pointer-events: none;
}
.hero h1 {
  color: #ffffff;
  font-size: clamp(2.15rem, 5.2vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  max-width: 15em;
  margin-bottom: 16px;
}
.hero .lede {
  color: #cfeae3;
  font-size: 1.19rem;
  max-width: 36em;
  margin-bottom: 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn-primary {
  background: #ffffff;
  color: var(--accent-deep);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.45);
}
.btn-primary:hover {
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -10px rgba(0, 0, 0, 0.5);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
}
.btn-secondary:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

/* ---------- Page head (inner pages) ---------- */
.page-head {
  background:
    radial-gradient(46rem 18rem at 90% -30%, rgba(15, 118, 110, 0.14), rgba(15, 118, 110, 0) 60%),
    linear-gradient(120deg, #e9f4f1 0%, #f4faf9 58%, #e9f0fa 130%);
  border-bottom: 1px solid var(--line);
}
.page-head-inner { padding-top: 42px; padding-bottom: 38px; }
.page-head h1 { font-size: clamp(1.85rem, 4vw, 2.45rem); margin-bottom: 10px; }
.page-head .lede { max-width: 38em; margin-bottom: 0; }
.page-head .byline { margin-bottom: 0; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin: 26px 0 6px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card-chip {
  align-self: flex-start;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--soft-2);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 13px;
}
.card h3 { margin: 0 0 8px; font-size: 1.14rem; line-height: 1.35; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
/* Stretch the title link across the whole card. */
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card p { color: var(--muted); font-size: 0.96rem; margin: 0; }
.card-more {
  margin-top: auto;
  padding-top: 15px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.card-featured { max-width: 700px; }
.card-featured h3 { font-size: 1.32rem; }

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid-topics { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Feature list (homepage "How we work") ---------- */
.feature-list {
  list-style: none;
  margin: 26px 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.feature-list li {
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0;
  box-shadow: var(--shadow-sm);
  color: var(--muted);
}
.feature-list li strong { display: block; color: var(--ink); font-size: 1.04rem; margin-bottom: 5px; }
@media (min-width: 860px) {
  .feature-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Articles ---------- */
article {
  max-width: 46rem;
  margin: 0 auto;
  padding-top: 46px;
  font-size: 1.07rem;
  line-height: 1.78;
}
article h1 {
  font-size: clamp(1.95rem, 4.2vw, 2.55rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
  margin-bottom: 14px;
}
article h2 { font-size: 1.48rem; margin: 42px 0 12px; }
article h3 { font-size: 1.2rem; margin: 30px 0 10px; }
article a { text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
article li { margin-bottom: 8px; }
.byline {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
article .byline { margin-bottom: 30px; }
.featured-image { margin: 0 0 26px; }
.featured-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
article img { border-radius: var(--radius-sm); }
article blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  background: var(--soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}
article blockquote p { margin: 0; }
article table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 22px 0;
}
article th, article td {
  border: 1px solid var(--line);
  padding: 9px 13px;
  text-align: left;
  white-space: nowrap;
}
article th { background: var(--soft); }
.tip {
  background: linear-gradient(180deg, #eef7f4, var(--soft));
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 15px 18px;
  margin: 22px 0;
}
.tip p { margin: 0; }

/* ---------- Calculator (Tools) ---------- */
.calculator {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-md);
  padding: 26px;
  max-width: 600px;
  margin-top: 24px;
}
.calculator label {
  display: block;
  font-weight: 650;
  margin: 16px 0 6px;
}
.calculator label:first-of-type { margin-top: 0; }
.calculator input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.calculator input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}
.calculator button {
  margin-top: 20px;
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-dark) 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.calculator button:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.calc-results {
  margin-top: 20px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px 8px;
}
.calc-results p { margin-bottom: 10px; }
.calc-error { color: #b3261e; font-weight: 600; }

/* ---------- Forms (static for now) ---------- */
.static-form { margin-top: 8px; }
.static-form label { display: block; font-weight: 650; margin: 16px 0 6px; }
.static-form input,
.static-form textarea {
  width: 100%;
  max-width: 560px;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-family: inherit;
  color: var(--ink);
}
.static-form input:focus,
.static-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}
.static-form input:disabled,
.static-form textarea:disabled { background: var(--soft); color: var(--muted); }
.static-form button {
  margin-top: 18px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  background: #c7d2ce;
  color: #43534e;
  cursor: not-allowed;
}
.notice {
  background: #fff8e1;
  border: 1px solid #e8d48b;
  border-radius: var(--radius);
  padding: 15px 18px;
  max-width: 46rem;
  margin-top: 22px;
}
.notice p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(160deg, var(--accent-deep) 0%, #0a443d 100%);
  color: #cfe4de;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding-top: 46px;
  padding-bottom: 38px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 10px;
}
.footer-logo .logo-mark { border-radius: 7px; }
.footer-brand { color: #b7d5cd; margin: 0; max-width: 30em; }
.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8fc7ba;
  margin: 4px 0 13px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a {
  color: #d9ece6;
  text-decoration: none;
  font-size: 0.96rem;
}
.footer-links a:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 18px;
  padding-bottom: 22px;
}
.footer-note { color: #93b8ae; font-size: 0.87rem; margin: 0; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .header-inner { gap: 4px 14px; }
  .main-nav {
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { white-space: nowrap; padding: 7px 10px; }
  .hero-inner { padding: 50px 20px 56px; }
  .hero-glyph { width: 210px; }
  .section { padding-top: 42px; }
  article { padding-top: 36px; }
  .calculator { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .calculator button, .main-nav a { transition: none; }
  .card:hover, .btn:hover, .calculator button:hover { transform: none; }
}
