:root {
  color-scheme: light dark;
  --paper: #faf8f4;
  --surface: #ffffff;
  --ink: #16241e;
  --muted: #5f6b64;
  --line: #e2ded5;
  --accent: #24503f;
  --accent-ink: #fff;
  --band: #e9f0ea;
  --deep: #1f4636;
  --danger: #c2412d;
  --ok: #2f9e77;
  --rhythm: clamp(72px, 10vw, 132px);
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #141a17; --surface: #1c2420; --ink: #e9ede9; --muted: #98a39c; --line: #2e3a34; --accent: #7fc4a3; --accent-ink: #0f1a15; --danger: #ef7a66; --band: #19221d; --deep: #1f4636; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.75 "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "palt";
  word-break: auto-phrase; /* break Japanese between phrases, not mid-word */
}
a { color: inherit; }
.wrap { max-width: 1080px; margin-inline: auto; padding-inline: clamp(24px, 5vw, 48px); }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: .01em; }
.brand { font-size: 21px; }
.brand .mark { width: 26px; height: 26px; fill: var(--accent); stroke: none; }
.nav .grow { flex: 1; }
.nav a.link { text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; }
.nav a.link:hover { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { border-color: transparent; background: none; padding-inline: 8px; }
.btn.ghost:hover { color: var(--accent); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- landing ---------- */
.hero { padding-block: clamp(20px, 4vw, 44px) 0; background: linear-gradient(180deg, var(--paper) 0%, color-mix(in srgb, var(--band) 70%, var(--paper)) 62%, #e7dccb 100%); overflow: hidden; }
.hero .eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 12px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.3; letter-spacing: .01em; margin: 0 0 18px; font-weight: 800; }
.hero h1 span { display: inline-block; }
.hero p.lead { color: var(--ink); margin: 0 0 26px; max-width: 32em; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta small { color: var(--muted); font-size: 13px; flex-basis: 100%; }

/* the browser mock: pick a project, the signed-in accounts change with it */
.mock { --c: #d9573f; margin-top: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; overflow: hidden; background: var(--surface); box-shadow: 0 30px 80px -30px rgba(20, 40, 30, .45); }
.mock .chrome { display: flex; align-items: flex-end; gap: 6px; height: 40px; padding: 0 14px; background: color-mix(in srgb, var(--c) 10%, #edeae4); transition: background .25s; }
.mock .chrome i { width: 11px; height: 11px; border-radius: 50%; background: #d6d1c7; align-self: center; }
.mock .chrome i:first-child { margin-left: 2px; }
.mock .chrome .tab { margin-left: 14px; height: 30px; padding: 0 16px; border-radius: 9px 9px 0 0; background: var(--surface); box-shadow: inset 0 2px 0 var(--c); font-size: 12px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.mock .chrome .tab b { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.mock .body { display: grid; grid-template-columns: 76px 1fr; min-height: 330px; }
.mock .rail { background: color-mix(in srgb, var(--c) 10%, var(--paper)); border-right: 1px solid var(--line); padding: 18px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; transition: background .25s; }
.mock .rail button { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 4px; font-size: 10px; color: var(--muted); }
.mock .rail button span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; background: var(--pc); opacity: .5; transition: opacity .15s, box-shadow .15s; }
.mock .rail button[aria-pressed=true] span { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pc); }
.mock .rail button[aria-pressed=true] { color: var(--ink); font-weight: 600; }
.mock .rail button:focus-visible span { outline: 2px solid var(--ink); outline-offset: 3px; }
.mock .pane { padding: 22px clamp(16px, 3vw, 32px) 28px; min-width: 0; }
.mock .head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.mock .head .big { width: 48px; height: 48px; border-radius: 14px; background: var(--c); transition: background .25s; flex: none; }
.mock .head strong { font-size: 19px; display: block; line-height: 1.3; }
.mock .head small { color: var(--muted); font-size: 12px; }
.mock .head em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.mock ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mock li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; min-width: 0; }
.mock li b { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.mock li span { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock li em { display: block; margin-top: 8px; font-style: normal; font-size: 11px; color: var(--ok); }

section { padding-block: var(--rhythm); }
h2 { font-size: clamp(24px, 3.2vw, 36px); line-height: 1.4; margin: 0 0 14px; letter-spacing: .02em; font-weight: 800; }
.center { text-align: center; }
.intro { color: var(--muted); max-width: 36em; margin: 0 0 44px; }
.center .intro { margin-inline: auto; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin-top: 48px; text-align: left; }
.feature .art { height: 216px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px; margin-bottom: 22px; display: flex; flex-direction: column; justify-content: center; gap: 8px; overflow: hidden; }
.feature h3 { margin: 0 0 8px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.art .acct { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12px; }
.art .acct i { width: 28px; height: 28px; border-radius: 9px; background: var(--pc); flex: none; }
.art .acct b { display: block; font-size: 13px; }
.art .acct small { color: var(--muted); }
.art .acct em { margin-left: auto; font-style: normal; color: var(--ok); font-size: 11px; white-space: nowrap; }
.art.devices { flex-direction: row; align-items: flex-end; justify-content: center; gap: 12px; }
.dev { border: 2px solid var(--ink); border-radius: 8px; background: var(--band); display: flex; align-items: center; justify-content: center; gap: 4px; }
.dev i { width: 12px; height: 12px; border-radius: 4px; background: var(--pc); }
.dev.laptop { width: 96px; height: 62px; }
.dev.desktop { width: 120px; height: 80px; margin-bottom: 14px; position: relative; }
.dev.desktop::after { content: ""; position: absolute; bottom: -16px; left: 50%; width: 44px; height: 12px; transform: translateX(-50%); border-bottom: 2px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat; }
.dev.phone { width: 38px; height: 70px; border-radius: 10px; flex-direction: column; }
.art.chat { justify-content: flex-start; gap: 10px; font-size: 12px; }
.art.chat .who { font-weight: 700; font-size: 14px; }
.art.chat .me { align-self: flex-end; background: var(--band); padding: 6px 12px; border-radius: 12px 12px 2px 12px; }
.art.chat .ai { align-self: flex-start; color: var(--muted); }
.art.chat .win { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.art.chat .win i { width: 18px; height: 18px; border-radius: 6px; background: #d9573f; flex: none; }

.band { background: var(--band); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); margin-top: 44px; text-align: left; }
.steps div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.steps b { display: block; font-size: 16px; margin-bottom: 6px; }
.steps span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }

table.status { width: 100%; border-collapse: collapse; margin-top: 40px; text-align: left; }
table.status th, table.status td { padding: 15px 8px; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: top; }
table.status th { width: 24%; font-weight: 700; }
table.status td:last-child { color: var(--muted); }
.tag { display: inline-block; font-size: 12px; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { border-color: transparent; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-weight: 600; }

.closing { background: var(--deep); color: #fff; text-align: center; }
.closing h2 { color: #fff; }
.closing p { color: rgba(255, 255, 255, .8); margin: 0 0 30px; }
.closing .btn { background: #f7f3ea; color: #16241e; border-color: transparent; min-width: 220px; }
footer { padding-block: 30px 44px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; align-items: center; gap: 20px; }
footer .brand { font-size: 17px; }
footer .brand .mark { width: 20px; height: 20px; }
footer .grow { flex: 1; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--accent); }

/* ---------- terms, privacy and the like ---------- */
.legal { max-width: 760px; margin: clamp(24px, 5vw, 56px) auto var(--rhythm); padding-inline: 24px; }
.legal h1 { font-size: 26px; margin: 0 0 6px; }
.legal p.sub { color: var(--muted); margin: 0 0 32px; font-size: 14px; }
.legal h2 { font-size: 18px; margin: 36px 0 10px; letter-spacing: 0; }
.legal p, .legal li { font-size: 15px; }
.legal ol, .legal ul { padding-left: 1.4em; }
.legal li + li { margin-top: 4px; }
.legal .note { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px 20px; font-size: 14px; }
table.facts { width: 100%; border-collapse: collapse; font-size: 15px; }
table.facts th, table.facts td { padding: 14px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.facts th { width: 30%; font-weight: 700; }
code, .mono { font: 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- forms and account ---------- */
.auth { max-width: 420px; margin: clamp(32px, 8vw, 88px) auto; padding-inline: 24px; }
.auth h1, .account h1 { font-size: 26px; margin: 0 0 6px; }
.auth p.sub, .account p.sub { color: var(--muted); margin: 0 0 28px; font-size: 14px; }
label.field { display: block; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
label.field input { display: block; width: 100%; height: 46px; margin-top: 6px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
label.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.auth .btn { width: 100%; margin-top: 6px; }
.auth .alt { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.msg { min-height: 1.75em; margin: 4px 0 10px; font-size: 14px; color: var(--danger); }
.msg.ok { color: var(--ok); }

.account { max-width: 760px; margin: clamp(24px, 5vw, 56px) auto var(--rhythm); padding-inline: 24px; }
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 24px; margin-bottom: 20px; }
.card h2 { font-size: 16px; margin: 0 0 14px; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.card form { max-width: 420px; }
label.check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.plan { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.plan strong { font-size: 24px; }
.keybox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.keybox code { flex: 1; min-width: 240px; padding: 12px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: 15px; letter-spacing: .04em; user-select: all; }
.rows { border-top: 1px solid var(--line); }
.rows > div { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows > div span { flex: 1; min-width: 0; }
.rows > div small { color: var(--muted); }

@media (max-width: 820px) {
  .features, .steps { grid-template-columns: 1fr; }
  .mock ul { grid-template-columns: 1fr; }
  .mock .chrome .tab + .tab { display: none; }
  .nav a.link { display: none; }
  table.status th { width: 34%; }
  table.facts th, table.facts td { display: block; width: auto; }
  table.facts th { border-bottom: 0; padding-bottom: 0; }
  footer .wrap { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
[hidden] { display: none !important; }
