/* Loon Softworks — shared website design system (v2, Oct 2026)
   One file for loonsoftworks.com and every app site. Each site sets data-site on <html>
   to pick its accent. System fonts, no third-party requests, light and dark. */

:root {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-sm: .875rem; --t-0: 1.0625rem; --t-1: 1.25rem;
  --t-2: clamp(1.5rem, 1.25rem + 1vw, 1.95rem);
  --t-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --t-4: clamp(2.3rem, 1.6rem + 3vw, 3.5rem);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --max: 1120px; --text: 70ch; --gutter: clamp(20px, 4vw, 32px);
  --r: 14px; --r-sm: 8px; --r-shot: 28px;
  --bg: #ffffff; --surface: #f5f6f7; --raised: #ffffff; --line: #e3e5e8;
  --fg: #111316; --muted: #5b616b;
  --accent: #0f4c5c; --accent-fill: #0f4c5c; --on-accent: #ffffff; --tint: #eef5f6;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 10px 30px rgb(0 0 0 / .07);
  color-scheme: light dark;
}
html[data-site="lugnut"] { --accent: #c24705; --accent-fill: #e4570b; --tint: #fdf1ea; }
html[data-site="truffe"] { --accent: #6a4cf5; --accent-fill: #6a4cf5; --tint: #f2efff; }
html[data-site="calendar"] { --accent: #1d4ed8; --accent-fill: #1d4ed8; --tint: #eef3ff; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114; --surface: #17191d; --raised: #1c1f24; --line: #2a2d33;
    --fg: #ecedef; --muted: #a0a6b0;
    --accent: #7fc8d6; --accent-fill: #7fc8d6; --on-accent: #0f1114; --tint: #14242a;
    --shadow: none;
  }
  html[data-site="lugnut"] { --accent: #ff8a4c; --accent-fill: #ff8a4c; --tint: #2a1a12; }
  html[data-site="truffe"] { --accent: #a99bff; --accent-fill: #a99bff; --tint: #1e1a33; }
  html[data-site="calendar"] { --accent: #8ab0ff; --accent-fill: #8ab0ff; --tint: #151e33; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--t-0)/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.022em; font-weight: 650; text-wrap: balance; margin: 0 0 var(--s4); }
h1 { font-size: var(--t-4); letter-spacing: -.03em; }
h2 { font-size: var(--t-3); }
h3 { font-size: var(--t-1); letter-spacing: -.01em; }
p, li { max-width: var(--text); }
p { margin: 0 0 var(--s4); }
code, kbd { font-family: var(--mono); font-size: .9em; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 0 .3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s7) 0; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--s3); top: var(--s3); z-index: 50; background: var(--raised); color: var(--fg); padding: var(--s2) var(--s4); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s5); min-height: 64px; padding-block: var(--s2); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 650; font-size: 1.1rem; letter-spacing: -.01em; margin-inline-end: auto; min-height: 44px; }
.brand img, .brand svg { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.brand small { font-weight: 500; color: var(--muted); font-size: .8rem; letter-spacing: 0; }
.primary ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--s1); margin: 0; padding: 0; }
.primary a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; color: var(--fg); text-decoration: none; font-size: .95rem; font-weight: 500; border-radius: var(--r-sm); }
.primary a:hover { background: var(--surface); }
.primary a[aria-current="page"] { color: var(--accent); }
.lang { position: relative; font-size: .9rem; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-inline: 10px; border-radius: var(--r-sm); color: var(--muted); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--surface); color: var(--fg); }
.lang summary svg { width: 18px; height: 18px; }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 6px; min-width: 170px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.lang li a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--fg); text-decoration: none; }
.lang li a:hover { background: var(--surface); }
.lang li a[aria-current="true"] { color: var(--accent); font-weight: 600; }
@media (max-width: 700px) {
  .primary { order: 3; width: 100%; margin-inline: -10px; overflow-x: auto; }
  .primary ul { flex-wrap: nowrap; }
}

/* Android visitors */
.android-note { background: var(--tint); color: var(--fg); font-size: .92rem; text-align: center; padding: 10px var(--gutter); border-bottom: 1px solid var(--line); }
.android-note a { font-weight: 600; white-space: nowrap; }

/* Buttons, status */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: var(--s5) 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; font: 600 1rem/1 var(--font); text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--fg); background: var(--bg); }
.btn-ghost:hover { background: var(--surface); }
.status { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; color: var(--fg); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-fill); }
.status.live::before { background: #1e9e5a; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badges img { height: 48px; width: auto; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); padding: 0; margin: var(--s5) 0 0; color: var(--muted); font-size: .93rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 16px; height: 16px; flex: none; background: var(--accent-fill); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s8); align-items: center; padding-block: var(--s9) var(--s8); }
.hero.solo { grid-template-columns: minmax(0, 1fr); }
.hero.solo > div { max-width: 780px; }
.hero .app-icon { width: 88px; height: 88px; border-radius: 22px; margin-bottom: var(--s5); box-shadow: var(--shadow); }
.eyebrow { font-size: .9rem; font-weight: 600; color: var(--accent); margin: 0 0 var(--s3); letter-spacing: 0; }
.lede { font-size: var(--t-1); line-height: 1.5; color: var(--muted); max-width: 46ch; margin: 0; }
.hero-media { display: flex; justify-content: center; gap: var(--s4); }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s7); padding-block: var(--s8) var(--s7); }
}

/* Screenshots */
.shot { display: block; width: 100%; max-width: 300px; border-radius: var(--r-shot); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot.wide { max-width: 100%; border-radius: var(--r); }
.hero-media .shot:nth-child(2) { margin-top: var(--s8); }
@media (max-width: 520px) { .hero-media .shot { max-width: 46%; } .hero-media .shot:only-child { max-width: 300px; } }

/* Sections */
.section { padding-block: var(--s9); border-top: 1px solid var(--line); }
.section.tinted { background: var(--surface); border-top: 0; }
.section-head { max-width: 760px; margin-bottom: var(--s7); }
.section-head p { color: var(--muted); font-size: var(--t-1); line-height: 1.5; margin: 0; }
@media (max-width: 700px) { .section { padding-block: var(--s8); } }

/* Feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); align-items: center; }
.feature + .feature { margin-top: var(--s9); }
.feature:nth-of-type(even) .feature-media { order: -1; }
.feature-media { display: flex; justify-content: center; }
.feature ul { padding-inline-start: 1.1em; margin: 0; }
.feature li { margin: 6px 0; }
.feature h3 { font-size: var(--t-2); letter-spacing: -.02em; }
.feature .kicker { font-size: .9rem; font-weight: 600; color: var(--accent); margin-bottom: var(--s2); }
@media (max-width: 800px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .feature:nth-of-type(even) .feature-media { order: 0; }
  .feature + .feature { margin-top: var(--s8); }
}

/* Tile grid */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--s4); }
.tile { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); }
.section.tinted .tile { background: var(--bg); }
.tile h3 { font-size: 1.05rem; margin: var(--s3) 0 var(--s2); }
.tile p { color: var(--muted); font-size: .97rem; margin: 0; }
.tile .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--accent); }
.tile .ico svg { width: 22px; height: 22px; }
.tile .tag { display: inline-block; font-size: .75rem; font-weight: 600; color: var(--accent); margin-top: var(--s3); }

/* Studio app cards */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s5); }
.app-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--s3); background: var(--raised); border: 1px solid var(--line); border-radius: 20px; padding: var(--s6); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s; }
.app-card:hover { border-color: var(--card-accent, var(--accent)); transform: translateY(-2px); }
.app-card img { width: 72px; height: 72px; border-radius: 18px; }
.app-card h3 { font-size: 1.5rem; margin: var(--s2) 0 0; }
.app-card p { color: var(--muted); margin: 0; }
.app-card .for { font-size: .85rem; font-weight: 600; color: var(--card-accent, var(--accent)); }
.app-card .meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; }
.app-card .meta span { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.app-card .go { font-weight: 600; color: var(--card-accent, var(--accent)); }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: var(--s4); max-width: 820px; }
.plan { background: var(--raised); border: 1px solid var(--line); border-radius: 20px; padding: var(--s6); }
.plan.featured { border: 2px solid var(--accent-fill); }
.plan h3 { margin: 0; }
.plan .price { font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; margin: var(--s3) 0 var(--s1); }
.plan .price small { font-size: .95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { padding-inline-start: 1.1em; margin: var(--s4) 0 0; }
.plan li { margin: 6px 0; }
.fine { font-size: var(--t-sm); color: var(--muted); margin-top: var(--s4); }

/* Compare table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
th, td { text-align: start; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
thead th { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface); }
td.us, th.us { background: var(--tint); font-weight: 600; }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: 18px 0; font-weight: 600; font-size: 1.05rem; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--muted); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > :not(summary) { margin: 0 0 18px; color: var(--muted); }
.faq details ul { padding-inline-start: 1.1em; }

/* Closing call to action */
.closing { text-align: center; padding-block: var(--s9); border-top: 1px solid var(--line); }
.closing h2 { margin-inline: auto; max-width: 22ch; }
.closing p { margin-inline: auto; color: var(--muted); }
.closing .actions { justify-content: center; }

/* Reading pages: support, legal, guides */
.page { padding-block: var(--s8) var(--s9); }
.page-head { max-width: 760px; margin-bottom: var(--s6); }
.page-head h1 { font-size: var(--t-3); }
.page-head .lede { max-width: 60ch; }
.meta-line { color: var(--muted); font-size: .92rem; margin: var(--s3) 0 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin: 0 0 var(--s4); }
.crumbs a { color: var(--muted); }
.with-toc { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: var(--s8); align-items: start; }
.toc { position: sticky; top: var(--s5); font-size: .9rem; border-inline-start: 1px solid var(--line); padding-inline-start: var(--s4); }
.toc p { font-weight: 600; margin: 0 0 var(--s2); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }
@media (max-width: 900px) { .with-toc { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { max-width: var(--text); }
.prose h2 { font-size: var(--t-2); margin: var(--s7) 0 var(--s3); }
.prose h3 { margin: var(--s6) 0 var(--s2); }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin: 6px 0; }
.prose li > p { margin: 0; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s5); }
.prose dt { font-weight: 600; }
.prose dd { margin: 0; }
.summary { background: var(--tint); border-radius: var(--r); padding: var(--s5); margin: 0 0 var(--s6); max-width: var(--text); }
.summary p:last-child, .summary ul:last-child { margin-bottom: 0; }
.summary strong:first-child { display: block; margin-bottom: var(--s2); }
.callout { border: 1px solid var(--line); border-inline-start: 4px solid var(--accent-fill); border-radius: var(--r-sm); padding: var(--s4) var(--s5); margin: var(--s5) 0; max-width: var(--text); background: var(--raised); }
.callout p:last-child { margin: 0; }
.contact-box { display: grid; gap: var(--s2); background: var(--surface); border-radius: var(--r); padding: var(--s5); margin-top: var(--s7); max-width: var(--text); }
.contact-box h2 { font-size: var(--t-1); margin: 0; }
.contact-box p { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 44px; margin: var(--s3) 0; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--accent); font-weight: 650; font-size: .85rem; display: grid; place-items: center; }
.link-list { list-style: none; padding: 0 !important; display: grid; gap: var(--s3); max-width: 780px; }
.link-list a { display: block; padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--fg); background: var(--raised); }
.link-list a:hover { border-color: var(--accent-fill); }
.link-list strong { display: block; }
.link-list span { color: var(--muted); font-size: .95rem; }
.gallery { display: flex; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s3); }
.gallery a { flex: none; scroll-snap-align: start; }
.gallery img { height: 360px; width: auto; border-radius: 18px; border: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px var(--s5); margin: 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 0; font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s6); padding-block: var(--s8) var(--s6); }
.site-footer h2 { font-size: .85rem; font-weight: 600; letter-spacing: 0; color: var(--fg); margin: 0 0 var(--s3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer a { color: var(--muted); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.site-footer a[aria-current="true"] { color: var(--fg); font-weight: 600; }
.site-footer h2 .studio-mark { display: inline; min-height: 0; color: var(--fg); font-weight: 600; }
.fineprint { border-top: 1px solid var(--line); padding-block: var(--s5) var(--s7); color: var(--muted); font-size: .82rem; display: grid; gap: var(--s2); }
.fineprint p { margin: 0; max-width: 100ch; }

/* 404 */
.notfound { padding-block: var(--s9); text-align: center; }
.notfound h1 { font-size: var(--t-3); }
.notfound p { margin-inline: auto; color: var(--muted); }
.notfound .actions { justify-content: center; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .android-note, .toc { display: none; } body { background: #fff; color: #000; } }
.app-card[data-app="lugnut"] { --card-accent: #c24705; }
.app-card[data-app="calendar"] { --card-accent: #1d4ed8; }
.app-card[data-app="truffe"] { --card-accent: #6a4cf5; }
@media (prefers-color-scheme: dark) {
  .app-card[data-app="lugnut"] { --card-accent: #ff8a4c; }
  .app-card[data-app="calendar"] { --card-accent: #8ab0ff; }
  .app-card[data-app="truffe"] { --card-accent: #a99bff; }
}
