/* Acumen Kakeibo — shared styles. index.html / ja.html get this inlined by build.mjs. */
:root {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --sand: #f4eee4;
  --sage: #eef4ef;
  --blush: #fcefed;
  --indigo-soft: #eef2f7;
  --ink: #1e2a36;
  --muted: #4c5a68;
  --line: #e6dfd3;
  --red: #b42318;
  --red-dark: #8f1c13;
  --indigo: #29496b;
  --ok: #2f6b45;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 42, 54, .04), 0 8px 28px rgba(30, 42, 54, .07);
  --max: 1120px;
  --font-en: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

/* Language visibility: <html lang> is set before first paint. */
html[lang="ja"] [data-l="en"],
html:not([lang="ja"]) [data-l="ja"] { display: none !important; }

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
html[lang="ja"] body { font-family: var(--font-ja); line-height: 1.95; letter-spacing: .03em; font-size: 1rem; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 { letter-spacing: .04em; line-height: 1.5; line-break: strict; word-break: auto-phrase; }
html[lang="ja"] .hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.nw { white-space: nowrap; }
img, svg { max-width: 100%; display: block; }
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.35rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute !important; 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: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; color: #fff; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.ph { background: #fff4c2; color: #5a4300; border-radius: 4px; padding: 0 .25em; font-weight: 600; }

/* Wordmark: split red/white pill */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); white-space: nowrap; flex: none; }
.logo:hover { color: var(--ink); }
.mark { display: inline-flex; border: 2px solid var(--red); border-radius: 999px; overflow: hidden; font-weight: 800; font-size: 1.02rem; line-height: 1; letter-spacing: .01em; }
.mark span { padding: 7px 11px 8px; }
.mark .m1 { background: #fff; color: var(--red); }
.mark .m2 { background: var(--red); color: #fff; }
html[lang="ja"] .mark { letter-spacing: .06em; }
.by { font-size: .72rem; color: var(--muted); line-height: 1.2; letter-spacing: .02em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(251, 249, 245, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.hdr .logo { margin-right: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 11px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500; white-space: nowrap; letter-spacing: 0; }
.nav a:hover { background: var(--sand); color: var(--ink); }
.hdr-actions { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.hdr-actions .btn { white-space: nowrap; letter-spacing: 0; }
.login-link { color: var(--ink); font-weight: 600; text-decoration: none; font-size: .95rem; padding: 8px 6px; white-space: nowrap; }
.lang { display: inline-flex; background: var(--sand); border-radius: 999px; padding: 3px; }
.lang button { font: inherit; font-size: .85rem; font-weight: 700; border: 0; background: transparent; color: var(--muted); padding: 6px 11px; border-radius: 999px; cursor: pointer; min-height: 34px; white-space: nowrap; letter-spacing: 0; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.menu-btn { display: none; align-items: center; gap: 6px; font: inherit; font-weight: 700; background: transparent; border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 40px; min-width: 44px; justify-content: center; cursor: pointer; color: var(--ink); white-space: nowrap; letter-spacing: 0; }
.menu-btn svg { width: 18px; height: 18px; flex: none; }
.nav .nav-only-collapsed { display: none; }
.nav .nav-only-collapsed a { font-weight: 700; }
.nav .nav-only-collapsed .nav-cta { color: var(--red); }
@media (max-width: 1120px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 20px 16px; }
  .nav a { padding: 12px; border-radius: 12px; }
  .nav li.nav-only-collapsed { display: block; }
}
@media (max-width: 920px) { .hdr .by, .hdr-actions:has(.menu-btn) .login-link { display: none; } }
@media (max-width: 720px) { .hdr-cta { display: none; } }
@media (max-width: 520px) {
  .by { display: none; }
  .mark { font-size: .92rem; }
  .mark span { padding: 6px 9px 7px; }
  .login-link { display: none; }
  .hdr-in { gap: 8px; }
  .wrap { padding: 0 16px; }
}
@media (max-width: 420px) {
  .menu-btn .menu-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-btn { padding: 6px 10px; }
  .hdr-actions { gap: 6px; }
  .lang button { padding: 6px 8px; font-size: .8rem; }
}
@media (max-width: 360px) {
  .wrap { padding: 0 12px; }
  .mark { font-size: .8rem; }
  .mark span { padding: 5px 6px 6px; }
  .lang button { padding: 5px 6px; font-size: .75rem; min-height: 32px; }
  .menu-btn { padding: 5px 8px; min-width: 40px; }
}

/* Sections */
.sec { padding: clamp(64px, 9vw, 112px) 0; }
.sec-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
html[lang="ja"] .eyebrow { text-transform: none; letter-spacing: .1em; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46em; }
html[lang="ja"] .lead { font-size: 1.05rem; }
.sec-head { max-width: 760px; margin-bottom: 44px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card h3 { margin-bottom: .4em; }
.card .muted, .muted { color: var(--muted); }
.icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: var(--blush); color: var(--red); }
.icon svg { width: 24px; height: 24px; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: var(--indigo-soft); color: var(--indigo); vertical-align: middle; }
.badge-red { background: var(--blush); color: var(--red-dark); }
.check { list-style: none; padding: 0; margin: 0; }
.check li { position: relative; padding-left: 30px; margin: 0 0 10px; }
.check li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 16px; height: 9px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }

/* Footer */
.ftr { background: #1b2530; color: #d6dde4; padding: 56px 0 32px; font-size: .92rem; }
.ftr a { color: #fff; }
.ftr a:hover { color: #ffd6d1; }
.ftr .mark { border-color: #fff; }
.ftr .mark .m1 { background: #fff; color: var(--red); }
.ftr .by { color: #b9c3cc; }
.ftr-grid { display: grid; gap: 32px; grid-template-columns: 1.3fr 1fr; }
@media (max-width: 760px) { .ftr-grid { grid-template-columns: 1fr; } }
.ftr address { font-style: normal; margin-top: 16px; line-height: 1.8; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ftr h2 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.ftr .disclaimer { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); color: #b9c3cc; font-size: .85rem; }
.linkbtn { font: inherit; color: #fff; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Cookie banner */
.cc { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; display: flex; justify-content: center; }
.cc[hidden] { display: none; }
.cc-in { max-width: 760px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 48px rgba(30, 42, 54, .22); padding: 20px 22px; font-size: .95rem; max-height: calc(100vh - 24px); overflow: auto; }
.cc-t { font-size: 1.05rem; margin: 0 0 6px; }
.cc-p { color: var(--muted); margin-bottom: 14px; }
.cc-opts { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; display: grid; gap: 10px; }
.cc-opts legend { font-weight: 700; padding: 0 4px; }
.cc-opt { display: flex; gap: 10px; align-items: flex-start; }
.cc-opt input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--red); flex: none; }
.cc-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cc-btns .btn { min-height: 44px; padding: 10px 18px; font-size: .95rem; }
@media (max-width: 520px) {
  .cc { left: 8px; right: 8px; bottom: 8px; }
  .cc-in { padding: 16px; font-size: .86rem; line-height: 1.55; }
  html[lang="ja"] .cc-in { line-height: 1.7; }
  .cc-p { margin-bottom: 12px; }
  .cc-btns { gap: 8px; }
  .cc-btns .btn { flex: 1 1 40%; min-height: 44px; padding: 8px 12px; }
  .cc-btns [data-cc="settings"] { flex-basis: 100%; order: 3; }
}

/* Simple page layout (legal, auth) */
.page { padding: 48px 0 88px; }
.doc { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 56px); box-shadow: var(--shadow); }
.doc h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.doc h2 { font-size: 1.3rem; margin-top: 2em; padding-top: .2em; }
.doc h3 { font-size: 1.05rem; margin-top: 1.4em; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin-bottom: .4em; }
.draft { background: #fff4c2; border: 1px solid #ecd67a; color: #4d3a00; border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 28px; font-size: .95rem; }
.meta-line { color: var(--muted); font-size: .92rem; }
.toc { background: var(--sand); border-radius: var(--radius-sm); padding: 16px 20px; margin: 24px 0; }
.toc ol { margin: 0; }
table.kv { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .96rem; }
table.kv th, table.kv td { text-align: left; vertical-align: top; padding: 14px 12px; border-bottom: 1px solid var(--line); }
table.kv th { width: 32%; background: var(--bg); font-weight: 700; }
@media (max-width: 620px) { table.kv th, table.kv td { display: block; width: 100%; } table.kv th { border-bottom: 0; padding-bottom: 4px; } }
.tbl-wrap { overflow-x: auto; }
table.grid-t { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
table.grid-t th, table.grid-t td { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
table.grid-t th { background: var(--bg); }

/* Forms */
.auth { max-width: 460px; margin: 0 auto; }
.auth .doc { padding: clamp(24px, 5vw, 40px); }
.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.input, .select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid #c9c0b2; background: #fff;
  font: inherit; color: var(--ink);
}
.input:focus, .select:focus { outline: 3px solid rgba(41, 73, 107, .35); outline-offset: 1px; border-color: var(--indigo); }
.input[aria-invalid="true"] { border-color: var(--red); }
.hint { font-size: .86rem; color: var(--muted); margin-top: 6px; }
.err { font-size: .88rem; color: var(--red-dark); margin-top: 6px; font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px 10px; border: 1.5px solid #c9c0b2; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; background: #fff; }
.seg input:checked + label { border-color: var(--red); background: var(--blush); color: var(--red-dark); }
.seg input:focus-visible + label { outline: 3px solid var(--indigo); outline-offset: 2px; }
.cbx { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.cbx input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--red); flex: none; }
.pw { position: relative; }
.pw .input { padding-right: 84px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: inherit; font-size: .85rem; font-weight: 700; border: 0; background: var(--sand); color: var(--ink); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.status { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; font-weight: 600; }
.status:empty { display: none; }
.status.ok { background: var(--sage); color: var(--ok); }
.status.bad { background: var(--blush); color: var(--red-dark); }
.form-foot { text-align: center; margin-top: 20px; font-size: .95rem; color: var(--muted); }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
