/* Shared base styles for the site. Brand rules: lasso-master/handbook/brand.md */
@font-face { font-family: "DM Sans"; font-weight: 400; src: url("fonts/dm-sans-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "DM Sans"; font-weight: 500; src: url("fonts/dm-sans-500.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "DM Sans"; font-weight: 600; src: url("fonts/dm-sans-600.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "DM Sans"; font-weight: 700; src: url("fonts/dm-sans-700.woff2") format("woff2"); font-display: swap; }

:root {
  --brand: #7d2c25; --brand-dark: #5f211c;
  --ink: #2a2724; --bone: #f6f2ec; --white: #fff; --line: #e9e3da; --muted: #5e574f;
  --removed: #b3261e; --removed-tint: #f6e9e5; --added: #1f5f57; --added-tint: #e2eeeb;
  --bg: var(--bone); --fg: var(--ink); --sub: var(--muted); --border: var(--line); --strong: #d6cec2;
  --surface: var(--white); --sunken: #efe9e1;
  --cta-bg: var(--brand); --cta-fg: #fff; --cta-hover: var(--brand-dark);
  --accent: var(--brand); --mark: var(--brand);
  --font: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 0 1px 2px rgba(42,39,36,.06), 0 24px 60px -20px rgba(42,39,36,.25);
  color-scheme: light;
}
/* Dark sections: Ink background. Sierra Red never sits on Ink, so CTAs turn Bone. */
.dark {
  --bg: #1d1b19; --fg: #f6f2ec; --sub: #b3aaa0; --border: #34302c; --strong: #4a443f;
  --surface: #262321; --sunken: #181614;
  --cta-bg: #f6f2ec; --cta-fg: #2a2724; --cta-hover: #fff;
  --accent: #f6f2ec; --mark: #f6f2ec;
  --removed: #ec8a80; --removed-tint: rgba(236,138,128,.13); --added: #74c5b7; --added-tint: rgba(116,197,183,.13);
  --shadow: 0 0 0 1px rgba(255,255,255,.04), 0 30px 80px -20px rgba(0,0,0,.6);
  color-scheme: dark;
  background: var(--bg); color: var(--fg);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(1200px, 100% - 64px); } }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto; }

/* Type */
.display { font-weight: 700; letter-spacing: -.04em; line-height: 1; text-wrap: balance; }
.h2 { font-weight: 700; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.035em; line-height: 1.05; text-wrap: balance; }
.lede { color: var(--sub); font-size: clamp(18px, 1.9vw, 21px); font-weight: 500; line-height: 1.45; text-wrap: pretty; }
.eyebrow { display: inline-block; font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--sub); }
.mono { font-family: var(--mono); }

/* Mark */
.mark { width: 28px; height: 28px; flex: none; }
.mark path { fill: none; stroke: var(--mark); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; position: relative; z-index: 5; }
.nav-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 30px; font-size: 15px; font-weight: 500; color: var(--sub); }
.nav-links a:hover, .nav-signin:hover { color: var(--fg); }
.nav-right { display: flex; align-items: center; gap: 20px; font-size: 15px; font-weight: 500; }
.nav-signin { color: var(--sub); }
@media (max-width: 880px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav-signin { display: none; } }

/* Buttons: even 10px radius */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; font: 600 15px/1.2 var(--font); white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--cta-bg); color: var(--cta-fg); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--fg); }
.btn-secondary:hover { border-color: var(--strong); }
.btn-ghost { color: var(--fg); padding-inline: 6px; }
.btn-ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Pill / announcement */
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; color: var(--sub); max-width: 100%; }
.pill b { padding: 3px 9px; border-radius: 999px; background: var(--cta-bg); color: var(--cta-fg); font-size: 12px; font-weight: 600; }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Keycaps */
.kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font: 500 12px/1 var(--mono); color: var(--sub); }

/* Customer logos (made up) */
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 48px; color: var(--sub); }
.logo { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 19px; letter-spacing: -.03em; opacity: .8; }
.logo i { width: 16px; height: 16px; background: currentColor; display: inline-block; }
.logo.serif { font-family: Georgia, serif; font-weight: 400; letter-spacing: 0; font-style: italic; }
.logo.caps { font-size: 14px; letter-spacing: .22em; text-transform: uppercase; }
.logo.mono { font: 600 16px var(--mono); letter-spacing: -.02em; }

/* Footer */
.footer { padding-block: 64px 40px; border-top: 1px solid var(--border); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.footer h4 { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.footer li + li { margin-top: 10px; }
.footer li a { color: var(--sub); }
.footer li a:hover { color: var(--fg); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; color: var(--sub); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Product mock ---------- */
.app { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; text-align: left; font-size: 13px; color: var(--fg); }
.app-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--sunken); }
.app-dots { display: flex; gap: 6px; }
.app-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--strong); }
.app-title { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-title span { color: var(--sub); font-weight: 500; }
.app-people { display: flex; }
.app-people i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sunken); margin-left: -6px; display: grid; place-items: center; font: 600 10px var(--font); font-style: normal; color: #fff; }
.app-body { display: grid; grid-template-columns: 180px 1fr 260px; min-height: 340px; }
.app-side { border-right: 1px solid var(--border); padding: 14px 10px; display: grid; align-content: start; gap: 2px; }
.app-side h5 { margin: 0 8px 6px; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sub); }
.app-side a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--sub); }
.app-side a.on { background: var(--sunken); color: var(--fg); font-weight: 600; }
.app-side a::before { content: ""; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 2px; }
.app-canvas { position: relative; display: grid; place-items: center; padding: 24px 16px; background-color: var(--surface); background-image: radial-gradient(var(--strong) 1px, transparent 1.2px); background-size: 18px 18px; min-width: 0; }
.app-panel { border-left: 1px solid var(--border); padding: 14px; display: grid; align-content: start; gap: 12px; }
.app-agent { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.app-agent .mark { width: 18px; height: 18px; }
.app-msg { padding: 10px 12px; border-radius: 10px; background: var(--sunken); color: var(--fg); line-height: 1.45; }
.app-changes { display: grid; gap: 6px; }
.chg { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; }
.chg b { font: 700 12px var(--mono); width: 14px; text-align: center; }
.chg.rm { background: var(--removed-tint); border-color: transparent; }
.chg.rm b { color: var(--removed); }
.chg.rm span { text-decoration: line-through; text-decoration-color: var(--removed); }
.chg.add { background: var(--added-tint); border-color: transparent; }
.chg.add b { color: var(--added); }
.chg.mv b { color: var(--sub); }
.app-btns { display: flex; gap: 8px; }
.app-btns span { flex: 1; text-align: center; padding: 8px; border-radius: 8px; font-weight: 600; border: 1px solid var(--border); }
.app-btns .apply { background: var(--fg); color: var(--bg); border-color: var(--fg); } /* Apply is Ink, never red */
.app.compact .app-side { display: none; }
.app.compact .app-body { grid-template-columns: 1fr 220px; }
.app.compact .app-canvas { padding: 20px 10px; }
.app.bare .app-side, .app.bare .app-panel { display: none; }
.app.bare .app-body { grid-template-columns: 1fr; }
@media (max-width: 960px) { .app-side { display: none; } .app-body { grid-template-columns: 1fr 240px; } }
@media (max-width: 680px) { .app-body, .app.compact .app-body { grid-template-columns: 1fr; } .app-panel { border-left: 0; border-top: 1px solid var(--border); } }

/* Flow diagram */
.flow { width: 100%; height: auto; font-family: var(--font); overflow: visible; }
.f-node rect { fill: var(--surface); stroke: var(--strong); stroke-width: 1.5; }
.f-node text { fill: var(--fg); font-size: 14px; font-weight: 600; }
.f-node.start rect { fill: var(--fg); stroke: var(--fg); }
.f-node.start text { fill: var(--bg); }
.f-node.removed rect { fill: var(--removed-tint); stroke: var(--removed); stroke-dasharray: 5 4; }
.f-node.removed text.f-label { fill: var(--removed); text-decoration: line-through; }
.f-node.added rect { fill: var(--added-tint); stroke: var(--added); }
.f-tag { font: 700 10.5px var(--mono); letter-spacing: .06em; }
.removed .f-tag { fill: var(--removed); }
.added .f-tag { fill: var(--added); }
.f-edge { fill: none; stroke: var(--sub); stroke-width: 1.6; }
.f-dot { fill: var(--sub); }
.f-edge.removed { stroke: var(--removed); stroke-dasharray: 5 4; }
.f-dot.removed { fill: var(--removed); }
.f-edge.added { stroke: var(--added); }
.f-dot.added { fill: var(--added); }

/* Version switcher (review aid only) */
.vswitch { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: #2a2724; color: #f6f2ec; font: 600 13px var(--font); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.vswitch a { padding: 7px 10px; border-radius: 8px; }
.vswitch a:hover { background: rgba(255,255,255,.12); }
.vswitch span { padding: 0 6px; color: #b3aaa0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
