/* Shared base for asketes.app. Tokens mirror StoicApp/docs/contracts/design-tokens.json. */

@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url("/fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations");
}
@font-face {
	font-family: "Fraunces";
	font-style: italic;
	font-weight: 300 700;
	font-display: swap;
	src: url("/fonts/fraunces-latin-opsz-italic.woff2") format("woff2-variations");
}
@font-face {
	font-family: "DM Sans";
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url("/fonts/dm-sans-latin-opsz-normal.woff2") format("woff2-variations");
}

:root {
	color-scheme: light dark;
	--bg: #f5f0e6;
	--card: #fffdf8;
	--sand: #ede4d3;
	--line: #e3d9c6;
	--divider: #efe7d8;
	--tint: #ddebd6;
	--on-tint: #2f4a35;
	--accent: #a9c9a4;
	--accent-strong: #8fb98a;
	--on-accent: #2f4a35;
	--text: #2b2f27;
	--muted: #69665d;
	--forest: #2f4a35;
	--ink-on-forest: #f5f0e6;
	--shadow: 0 1px 2px rgb(43 47 39 / 0.05), 0 12px 32px -12px rgb(43 47 39 / 0.18);
	--shadow-lg: 0 2px 4px rgb(43 47 39 / 0.05), 0 40px 80px -30px rgb(43 47 39 / 0.35);

	--serif: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
	--sans: "DM Sans", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
	--r-sm: 12px;
	--r: 18px;
	--r-lg: 24px;
	--r-xl: 32px;
	--gutter: clamp(16px, 4vw, 40px);
	--max: 1160px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #1a201b;
		--card: #232b24;
		--sand: #2a332b;
		--line: #334036;
		--divider: #2c352d;
		--tint: #2c3b2e;
		--on-tint: #cfe3c9;
		--accent: #a9c9a4;
		--accent-strong: #bcd6b7;
		--on-accent: #2f4a35;
		--text: #efe9dd;
		--muted: #a8ad9f;
		--forest: #121713;
		--ink-on-forest: #efe9dd;
		--shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
		--shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 40px 80px -30px rgb(0 0 0 / 0.8);
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 88px;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 17px/1.6 var(--sans);
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}
img,
svg,
canvas {
	display: block;
	max-width: 100%;
}
img {
	height: auto;
}
a {
	color: inherit;
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}
a:hover {
	text-decoration-thickness: 2px;
}
button {
	font: inherit;
	color: inherit;
}
:focus-visible {
	outline: 2.5px solid var(--accent-strong);
	outline-offset: 3px;
	border-radius: 6px;
}
h1,
h2,
h3,
h4 {
	font-family: var(--serif);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.015em;
	margin: 0;
	text-wrap: balance;
}
p {
	margin: 0;
	text-wrap: pretty;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 100;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--card);
	box-shadow: var(--shadow);
}
.skip:focus {
	top: 12px;
}

.wrap {
	width: min(100% - 2 * var(--gutter), var(--max));
	margin-inline: auto;
}
.narrow {
	width: min(100% - 2 * var(--gutter), 760px);
	margin-inline: auto;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 24px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
	cursor: pointer;
	transition:
		transform 0.18s var(--ease),
		background-color 0.18s,
		box-shadow 0.18s;
	-webkit-tap-highlight-color: transparent;
}
.btn:active {
	transform: scale(0.97);
}
.btn-primary {
	background: var(--accent);
	color: var(--on-accent);
}
.btn-ghost {
	background: var(--card);
	border-color: var(--line);
}
@media (hover: hover) {
	.btn-primary:hover {
		background: var(--accent-strong);
	}
	.btn-ghost:hover {
		border-color: var(--accent);
	}
}
.btn-store {
	background: #0c0d0b;
	color: #fff;
	min-height: 56px;
	padding: 0 22px 0 18px;
	border-radius: 14px;
	gap: 10px;
	text-align: left;
	box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.5);
}
.btn-store svg {
	width: 26px;
	height: 26px;
	flex: none;
}
.btn-store span {
	display: grid;
	line-height: 1.1;
}
.btn-store small {
	font-size: 11px;
	font-weight: 500;
	opacity: 0.85;
}
.btn-store b {
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.01em;
}
@media (prefers-color-scheme: dark) {
	.btn-store {
		background: #fff;
		color: #0c0d0b;
	}
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--card);
	border: 1px solid var(--line);
	font-size: 14px;
	font-weight: 500;
}
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}
.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
}

/* Prose pages (privacy, terms, credits, support) */
.doc {
	padding: 56px 0 96px;
}
.doc h1 {
	font-size: clamp(36px, 6vw, 56px);
	margin-bottom: 12px;
}
.doc .lede {
	color: var(--muted);
	margin-bottom: 40px;
}
.prose h2 {
	font-size: clamp(24px, 3.4vw, 30px);
	margin: 48px 0 12px;
}
.prose h3 {
	font-size: 21px;
	margin: 32px 0 8px;
}
.prose p,
.prose ul,
.prose ol,
.prose table,
.prose blockquote {
	margin: 0 0 16px;
}
.prose ul,
.prose ol {
	padding-left: 1.3em;
}
.prose li {
	margin: 6px 0;
}
.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	display: block;
	overflow-x: auto;
}
.prose th,
.prose td {
	text-align: left;
	vertical-align: top;
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
}
.prose blockquote {
	padding: 14px 18px;
	border-radius: var(--r);
	background: var(--tint);
	color: var(--on-tint);
}
.prose code {
	font-size: 0.9em;
	padding: 1px 6px;
	border-radius: 6px;
	background: var(--sand);
}
.prose a {
	color: var(--on-tint);
	word-break: break-word;
}
@media (prefers-color-scheme: dark) {
	.prose a {
		color: var(--accent-strong);
	}
}
.notice {
	padding: 14px 18px;
	border-radius: var(--r);
	background: var(--sand);
	font-size: 15px;
	margin-bottom: 32px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* asketes.app/codewell: the app's calm, plain look. Paper, sage green, amber ICD-10 chips,
   system fonts, codes in monospace. No gradients, no decoration. Follows light and dark mode. */

:root {
	--bg: #f5f3ec;
	--card: #fffefa;
	--sand: #ebe8dd;
	--line: #dedacd;
	--divider: #e9e6db;
	--tint: #dfeae3;
	--on-tint: #1f221c;
	--accent: #2c6247;
	--accent-strong: #234f39;
	--on-accent: #ffffff;
	--text: #1f221c;
	--muted: #5a5f53;
	--chip-bg: #fbebd0;
	--chip-text: #8a4405;
	--shadow: none;
	--shadow-lg: none;
	--serif: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141612;
		--card: #1f221c;
		--sand: #262a23;
		--line: #333830;
		--divider: #2a2e27;
		--tint: #243229;
		--on-tint: #eceee6;
		--accent: #8fd0ac;
		--accent-strong: #a6ddc0;
		--on-accent: #141612;
		--text: #eceee6;
		--muted: #a9ae9f;
		--chip-bg: #3b2a14;
		--chip-text: #f2c88f;
	}
}

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 650; letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: clamp(28px, 4vw, 38px); }
code, .code { font-family: var(--mono); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); margin-top: 20px; line-height: 1.55; }
.fine a { color: inherit; }
[hidden] { display: none !important; }
.btn { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) { .btn:hover { background: var(--accent-strong); } }
.btn-store, .btn-store:hover { background: #0c0d0b; color: #fff; }
@media (prefers-color-scheme: dark) { .btn-store, .btn-store:hover { background: #fff; color: #0c0d0b; } }
.cta-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.soon-badge { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 16px; }

/* Nav + footer */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font-weight: 650; font-size: 20px; letter-spacing: -0.01em; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.nav-cta { min-height: 40px; padding: 0 18px; font-size: 15px; }
.foot { padding: 48px 0 80px; font-size: 14.5px; color: var(--muted); border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: start; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot .brand { font-size: 18px; margin-bottom: 10px; }
.foot .brand-mark { width: 30px; height: 30px; }
.foot-legal { margin-top: 24px; line-height: 1.55; }
.foot-legal + .foot-legal { margin-top: 10px; }
@media (max-width: 760px) {
	.foot-in { grid-template-columns: 1fr; }
	.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Support + legal pages */
.doc h1 { font-size: clamp(34px, 6vw, 48px); }
.prose h2 { font-size: 24px; }
.doc .prose a, .doc .lede a { color: var(--accent); }
.prose table { font-size: 15px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); }
.doc.faq { padding-top: 48px; }

/* ICD-10 chip */
.chip { display: inline-block; font-family: var(--mono); font-size: 0.9em; padding: 1px 9px; border-radius: 8px; background: var(--chip-bg); color: var(--chip-text); }

/* Hero */
.hero { padding: clamp(36px, 6vw, 80px) 0; }
.hero-in { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); margin: 10px 0 0; }
.hero .lede { font-size: clamp(17px, 1.7vw, 19px); max-width: 560px; margin: 20px 0 28px; }
.hero-shot { display: flex; justify-content: center; }
.hero-shot img { width: min(300px, 66vw); border-radius: 30px; border: 1px solid var(--line); }
@media (max-width: 800px) { .hero-in { grid-template-columns: 1fr; } }

/* Feature blocks */
.features { padding: clamp(24px, 4vw, 56px) 0; }
.feat { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(28px, 4vw, 52px) 0; border-top: 1px solid var(--line); }
.feat.is-flip .feat-text { order: 2; }
.feat h3 { font-size: clamp(24px, 3vw, 32px); margin: 8px 0 12px; }
.feat-text p:not(.eyebrow) { color: var(--muted); max-width: 440px; }
.shot img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }
@media (max-width: 800px) {
	.feat { grid-template-columns: 1fr; }
	.feat.is-flip .feat-text { order: 0; }
}

/* Free vs Pro */
.plans { padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.plans h2 { text-align: center; }
.plans-lede { text-align: center; color: var(--muted); margin: 10px 0 32px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 920px; margin: 0 auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.plan-pro { border-color: var(--accent); }
.plan h3 { font-size: 22px; margin-bottom: 12px; }
.plan ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.plan-note { color: var(--muted); font-size: 14.5px; margin-top: 16px; }
@media (max-width: 760px) { .plan-grid { grid-template-columns: 1fr; } }

/* Privacy + closing */
.quiet { padding: clamp(24px, 4vw, 56px) 0 clamp(48px, 7vw, 90px); }
.quiet h2 { margin-bottom: 20px; text-align: center; }
.quiet-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.quiet-list li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; color: var(--muted); }
.quiet-list b { color: var(--text); }
.final { background: var(--sand); text-align: center; padding: clamp(48px, 7vw, 88px) 0; }
.final-in { display: grid; justify-items: center; gap: 16px; }
.final-icon { border-radius: 22px; box-shadow: 0 0 0 1px var(--line); }
.final .cta-row { justify-content: center; }
