/* twirlyhouse.com: one small style sheet for every page on both sites (home, Services, Industries, Contact, Holdings, 404).
   Look: "Copper Line" (T1) from the 2026-11-02 website playground, kept spartan. Phone first, light and dark. */
:root {
  --bg: #fbfaf8; --surface: #ffffff; --ink: #20170f; --muted: #625548; --line: #e7dfd5;
  --ac: #a44a12; --ac-ink: #ffffff; --ac-soft: #f6ece4;
  --mg-blue: #0b6e99; --mg-ink: #0f1722; --err: #b3261e;
  --f: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fd: Rockwell, "Roboto Slab", "Zilla Slab", "DejaVu Serif", Georgia, serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100b; --surface: #1f1912; --ink: #f5ece0; --muted: #baa994; --line: #3a2e22;
    --ac: #f0a25c; --ac-ink: #301603; --ac-soft: #2a2017;
    --mg-blue: #56b6dd; --mg-ink: #e8edf3; --err: #f2b8b5;
  }
}
@font-face {
  /* Only for the MedGiven wordmark, drawn as MedGiven draws it. OFL-1.1, license beside the file. */
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/atkinson-hyperlegible-next-latin.woff2) format("woff2");
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 64px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { font: 400 16px/1.55 var(--f); color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: var(--ac); text-underline-offset: 2px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.lg { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.rd { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; }
.rd img { width: 100%; height: 100%; display: block; }
.wm { position: relative; display: inline-block; padding-top: 9px; font: 700 1.16rem/1.05 var(--fd); letter-spacing: -.02em; white-space: nowrap; }
.wm .roof { position: absolute; top: -1px; left: 0; width: 64%; height: 13px; color: var(--ac); }
.wm small { display: block; margin-top: 2px; font: 500 .72rem/1 var(--f); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 4px; list-style: none; }
.nav a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav a:hover { background: var(--ac-soft); }
.nav .wide { display: none; }
@media (min-width: 760px) { .nav .wide { display: block; } }
@media (max-width: 380px) {
  .top .wrap { gap: 6px; } .lg { gap: 8px; } .wm { font-size: 1.06rem; } .nav a { padding: 8px 6px; } .app { padding: 16px; }
}
@media (max-width: 359px) { .nav { gap: 0; } .nav a { padding: 8px 4px; font-size: .9rem; } }
/* Holdings: a longer logo beside two links, so its phone menu runs a little tighter */
@media (max-width: 400px) { .nav.tight { gap: 0; } .nav.tight a { padding: 8px 5px; font-size: .9rem; } }
@media (max-width: 359px) { .nav.tight a { padding: 8px 3px; font-size: .82rem; } .top .wrap:has(.tight) .wm { font-size: .98rem; } .top .wrap:has(.tight) .lg { gap: 6px; } }

/* Hero */
.hero { padding: 32px 0 28px; }
.hero .wrap { display: grid; gap: 24px; align-items: center; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ac); }
h1 { font: 700 clamp(1.9rem, 6.4vw, 3.1rem)/1.08 var(--fd); letter-spacing: -.025em; margin: 8px 0 12px; }
/* Orphan control: headings balance their lines; text avoids a lone last word (key endings also carry a no-break space) */
h1, h2 { text-wrap: balance; }
p, li, blockquote footer { text-wrap: pretty; }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 38em; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 8px; font-weight: 600; text-decoration: none; background: var(--ac); color: var(--ac-ink); border: 1px solid var(--ac); }
.btn.alt { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.alt:hover { border-color: var(--ac); }
.hero .art { display: none; }
@media (min-width: 760px) {
  .hero { padding: 56px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr 260px; gap: 48px; }
  .hero .art { display: block; width: 260px; height: 260px; border-radius: 50%; overflow: hidden; box-shadow: 0 24px 48px -28px rgb(32 23 15 / .55); }
  .hero .art img { width: 100%; height: 100%; display: block; }
}

/* Sections */
.sec { padding: 32px 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .sec { padding: 48px 0; } }
h2 { font: 700 clamp(1.4rem, 4.2vw, 1.9rem)/1.15 var(--fd); letter-spacing: -.02em; margin-bottom: 8px; }
.sub { color: var(--muted); max-width: 44em; }
.sub + * { margin-top: 20px; }

/* App cards */
.apps { display: grid; gap: 16px; }
@media (min-width: 760px) { .apps { grid-template-columns: 1fr 1fr; } }
.app { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.app .logo { height: 46px; display: flex; align-items: center; }
.app .logo img { width: 272px; max-width: 100%; height: auto; display: block; }
.app p { color: var(--muted); }
.app .go { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 600; text-decoration: none; }
/* Each card wears its own app's colors and corners, light and dark (locked copies; change them only when the app does).
   CareFully Covered: PlanGuide web/brand-standard.css (UI pair) and docs/style-guide.md section 2.
   MedGiven: design/app.css tokens and docs/brand/visual-identity.md. */
.app.cc { background: #f8f7fd; border-color: #e6e2f5; border-radius: 18px; }
.app.cc p { color: #5e5884; }
.app.cc .go { background: #7264dc; color: #ffffff; border-radius: 12px; }
.app.cc .go:hover { background: #4536b8; }
.app.mgv { background: #f2f4f7; border-color: #e6e9ee; border-radius: 14px; }
.app.mgv p { color: #5f6b7a; }
.app.mgv .go { background: #0b6e99; color: #ffffff; border-radius: 14px; }
.app.mgv .go:hover { background: #135366; }
.app.cc .go:focus-visible { outline-color: #7264dc; border-radius: 12px; }
.app.mgv .go:focus-visible { outline-color: #0b6e99; border-radius: 14px; }
@media (prefers-color-scheme: dark) {
  .app.cc { background: #1c1830; border-color: #2f2a4e; }
  .app.cc p { color: #a9a2cf; }
  .app.cc .go { background: #a99bff; color: #16112e; }
  .app.cc .go:hover { background: #c7beff; }
  .app.mgv { background: #151c25; border-color: #232d39; }
  .app.mgv p { color: #9aa6b4; }
  .app.mgv .go { background: #56b6dd; color: #04202c; }
  .app.mgv .go:hover { background: #8ccbe6; }
  .app.cc .go:focus-visible { outline-color: #a99bff; }
  .app.mgv .go:focus-visible { outline-color: #56b6dd; }
}
.app.tba { grid-column: 1 / -1; background: transparent; border-style: dashed; padding: 16px 20px; gap: 4px; }
.app.tba b { font: 700 1.1rem/1.2 var(--fd); }
.owner { margin-top: 14px; font-size: .95rem; color: var(--muted); }

/* Holdings mark: the TwirlyHouse stair seen through a round vault door (rim, locking bolts, door seam) */
.vault { position: relative; }
.vault .door { position: absolute; inset: 0; width: 100%; height: 100%; }
.door .rim { fill: none; stroke: var(--ac); }
.door .bolt { fill: var(--bg); }
.door .seam { fill: none; stroke: #ffffff; stroke-opacity: .6; stroke-width: 1.5; }

/* MedGiven lockup, as MedGiven draws it: capsule height to name size 2:3, two-tone name, small TM */
.mg { display: inline-flex; align-items: center; gap: 8px; font: 800 30px/1 "Atkinson Hyperlegible Next", var(--f); color: var(--mg-ink); }
.mg svg { width: 44px; height: 20px; flex: none; color: var(--mg-blue); }
.mg .gv { color: var(--mg-blue); }
.mg sup { font-size: .34em; font-weight: 600; vertical-align: top; position: relative; top: -.02em; margin-left: .04em; opacity: .6; }

/* Lists */
.ticks { list-style: none; display: grid; gap: 8px 32px; }
@media (min-width: 760px) { .ticks { grid-template-columns: 1fr 1fr; } }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 5px; border: solid var(--ac); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.offers { display: grid; gap: 12px; }
/* Computer: one aligned table, name in the left column and what it is in the right, a thin line between rows */
@media (min-width: 760px) {
  .offers { gap: 0; }
  .offers p { display: grid; grid-template-columns: 17rem 1fr; gap: 32px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
  .offers p:last-child { border-bottom: 1px solid var(--line); }
}
.offers b { display: block; }
.offers span { color: var(--muted); }

/* Contact and footer */
.contact .acts { margin-top: 14px; }
.who { margin-top: 12px; font-size: .9rem; color: var(--muted); }
.foot { border-top: 1px solid var(--line); padding: 16px 0 24px; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.foot p + p { margin-top: 4px; }
.foot a { color: inherit; }

/* Subpages (Services, Industries, Contact) */
.page-head { padding: 28px 0 20px; }
@media (min-width: 760px) { .page-head { padding: 48px 0 32px; } }
.sec h2 + .offers { margin-top: 14px; }
.more { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 16px; font-weight: 600; }
.more a { text-decoration: none; }
.more a:hover { text-decoration: underline; }
.list-line { margin-top: 16px; color: var(--muted); }
.list-line b { color: var(--ink); }

/* Contact form: one column on phones, name and email side by side on wider screens */
.form { display: grid; gap: 14px; max-width: 40rem; margin-top: 24px; }
.form label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.form input, .form select, .form textarea { width: 100%; min-height: 44px; padding: 9px 12px; font: 400 1rem/1.4 var(--f); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.form textarea { min-height: 8.5rem; resize: vertical; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--ac); outline-offset: 1px; border-color: var(--ac); }
.form .two { display: grid; gap: 14px; }
@media (min-width: 640px) { .form .two { grid-template-columns: 1fr 1fr; } }
.form .send { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
button.btn { font: 600 1rem/1 var(--f); cursor: pointer; }
.btn[disabled] { opacity: .55; cursor: default; }
.status { font-size: .95rem; color: var(--muted); }
.status.ok { color: var(--ink); font-weight: 600; }
.status.err { color: var(--err); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
