/* Palette and article styling follow the supplied original Cocoon/Grayish pages. */
:root {
  color-scheme: light dark;
  --bg: #fff;
  --surface: #fff;
  --text: #535252;
  --muted: #667781;
  --accent: #356e59;
  --mint: #afd8c7;
  --line: #e4e8ea;
  --soft: #edf9f2;
  --heading: #f7f9fb;
  --notice: #fff8e8;
  --notice-text: #795629;
  --emphasis: #b13d42;
  --radius: 2px;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", -apple-system, BlinkMacSystemFont, "Yu Gothic", Meiryo, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.8; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: #d4eadf; color: #263f35; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 5; background: var(--surface); padding: 8px 20px; }
.skip-link:focus { top: 8px; }
.preview-banner { padding: 8px 24px; background: var(--notice); color: var(--notice-text); font-size: 12px; text-align: center; border-bottom: 1px solid var(--line); }
.site-notice { background: var(--soft); border-bottom: 1px solid var(--mint); color: var(--text); }
.notice-inner { max-width: 1200px; margin: auto; padding: 16px 40px; }
.notice-inner strong { display: block; font-size: 13px; font-weight: 600; color: var(--accent); }
.notice-inner p { font-size: 12px; line-height: 1.9; margin: 5px 0 0; }

/* Shared header and footer. */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1200px; margin: auto; padding: 30px 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { color: var(--text); font-size: 25px; font-weight: 500; letter-spacing: .035em; text-decoration: none; line-height: 1.3; }
.brand-logo { display: block; width: 230px; max-width: 100%; height: auto; }
.wordmark { flex: 0 1 230px; min-width: 0; }
.help-link { font-size: 12px; color: var(--muted); text-decoration: none; }
.help-link span { margin-left: 8px; }
.site-footer { border-top: 1px solid var(--line); background: var(--heading); }
.footer-inner { max-width: 1200px; margin: auto; padding: 38px 40px; display: flex; align-items: start; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand { font-size: 15px; color: var(--text); font-weight: 500; text-decoration: none; }
.footer-brand .brand-logo { width: 160px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 11px; flex: 1; max-width: 640px; }
.footer-inner nav a { text-decoration: none; color: var(--muted); }
.footer-inner small { font-size: 10px; color: var(--muted); }

/* Index. */
.home-main { max-width: 980px; margin: auto; padding: 64px 40px 80px; }
.eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .12em; color: var(--muted); }
.intro h1 { font-size: clamp(28px, 4.8vw, 38px); font-weight: 500; line-height: 1.5; letter-spacing: .03em; margin: 19px 0 24px; }
.intro h1::after { content: ""; display: block; width: 64px; height: 3px; margin-top: 24px; background: var(--mint); }
.intro > p { font-size: 16px; margin: 0 0 10px; }
.intro .intro-description { font-size: 14px; color: var(--muted); max-width: 610px; }
.document-list { margin-top: 40px; border-top: 1px solid var(--line); }
.document-row { display: grid; grid-template-columns: 40px 1fr 36px; gap: 20px; padding: 28px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); transition: background .15s; }
.document-row:hover { background: var(--heading); }
.document-number { font-size: 12px; color: var(--muted); padding-top: 5px; font-variant-numeric: tabular-nums; }
.document-row h2 { font-size: 21px; font-weight: 500; margin: 7px 0; line-height: 1.6; }
.document-row p { font-size: 13px; color: var(--muted); margin: 0; }
.row-arrow { font-size: 25px; align-self: center; color: var(--accent); }
.help-note { padding: 25px 28px; margin-top: 42px; background: var(--soft); border-left: 3px solid var(--mint); }
.help-note > span { font-weight: 600; font-size: 14px; }
.help-note p { font-size: 13px; color: var(--muted); margin: 5px 0 0; }

/* Document navigation keeps the current layout and native details interaction. */
.document-main { max-width: 1200px; padding: 26px 40px 80px; margin: auto; }
.breadcrumbs { display: flex; gap: 13px; flex-wrap: wrap; color: var(--muted); font-size: 11px; margin-bottom: 38px; }
.breadcrumbs a { color: var(--muted); }
.document-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 48px; }
.document-sidebar { min-width: 0; }
.document-sidebar > nav { display: flex; flex-direction: column; gap: 0; margin-bottom: 32px; }
.document-sidebar .eyebrow { padding: 0 12px 12px; border-bottom: 2px solid var(--mint); }
.document-sidebar > nav > a { font-size: 12px; text-decoration: none; color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; }
.document-sidebar > nav > a:hover { color: var(--accent); background: var(--heading); }
.document-sidebar > nav > a[aria-current] { color: var(--accent); background: var(--soft); border-left-color: var(--mint); font-weight: 600; }
.toc { border-top: 1px solid var(--muted); border-bottom: 1px solid var(--muted); padding: 0; }
.toc summary { cursor: pointer; font-size: 12px; font-weight: 500; margin: 0; padding: 12px; color: var(--muted); background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 3px, var(--heading) 3px, var(--heading) 6px); }
.toc ol { list-style: none; padding: 18px 12px 8px; margin: 0; }
.toc li { margin: 0 0 12px; font-size: 12px; line-height: 1.7; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc .toc-h3 { padding-left: 12px; }

/* Flat white article, gray title bands, and mint rules echo the original site. */
.document { min-width: 0; background: var(--surface); padding: 0 12px 24px 20px; }
.document-heading { padding-bottom: 24px; margin-bottom: 34px; border-bottom: 1px solid var(--mint); }
.document-heading h1 { font-size: clamp(24px, 3vw, 30px); font-weight: 600; line-height: 1.6; letter-spacing: .02em; margin: 12px 0 0; overflow-wrap: anywhere; }
.updated { font-size: 11px; color: var(--muted); margin: 18px 0 0; text-align: right; }
.draft-note { font-size: 12px; color: var(--notice-text); background: var(--notice); padding: 8px 12px; margin: 16px 0 0; }
.prose { font-size: 15px; line-height: 2; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.5em; }
.prose h2 { position: relative; font-size: 23px; font-weight: 600; line-height: 1.7; margin: 3em 0 1.5em; padding: 12px 8px; border-bottom: 3px solid var(--line); }
.prose h2::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 64px; height: 3px; background: var(--mint); }
.prose h3 { font-size: 19px; font-weight: 600; line-height: 1.8; margin: 2.5em 0 1.5em; padding: 12px 16px; background: var(--heading); }
/* Terms/privacy clauses were promoted from h3 to h2 during migration. */
.prose h2[id^="block-"] { font-size: 21px; border-bottom: 0; padding: 12px 16px; background: var(--heading); }
.prose h2[id^="block-"]::after { content: none; }
.prose h4 { font-size: 16px; font-weight: 600; line-height: 1.9; margin: 2em 0 1em; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose > h2:first-child, .prose > h3:first-child, .prose > section:first-child > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.7em; margin: 0 0 1.6em; }
.prose li { padding-left: .2em; margin: .5em 0; }
.prose li > ul, .prose li > ol { margin: .4em 0 1em; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin: 1.5em 0; padding: 18px 22px; background: var(--heading); border-left: 3px solid var(--mint); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14px; }
.prose th, .prose td { padding: 16px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.prose th { background: var(--heading); min-width: 95px; width: 25%; font-weight: 500; }
.prose figure { margin: 30px 0; }
.prose img, .prose video { display: block; width: auto; max-width: 100%; max-height: 760px; height: auto; margin: auto; }
.prose figcaption { font-size: 11px; color: var(--muted); text-align: center; margin-top: 10px; }
.media-placeholder > div { border: 1px dashed var(--line); background: var(--heading); padding: 42px 20px; text-align: center; }
.media-placeholder span { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.media-placeholder p { font-size: 13px; margin: 10px 0 0; }
.prose pre { overflow: auto; padding: 16px; background: var(--heading); }
.prose code { font-family: monospace; }
.prose .callout, .prose .callout-warning { margin: 1.6em 0; padding: 20px 24px; background: var(--soft); border: 1px solid var(--mint); border-left-width: 3px; border-radius: var(--radius); }
.prose .callout-warning { background: var(--notice); border-color: #dcc8a4; }
.prose .callout p:last-child, .prose .callout-warning p:last-child, .prose .callout ul:last-child, .prose .callout-warning ul:last-child { margin-bottom: 0; }
.prose .emphasis { font-weight: 700; color: var(--emphasis); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose .text-right { text-align: right; }
.back-top { display: block; text-align: right; font-size: 11px; margin-top: 44px; border-top: 1px solid var(--mint); padding-top: 22px; }
.not-found { max-width: 900px; min-height: 55vh; margin: auto; padding: 100px 40px; }
.not-found h1 { font-size: 30px; line-height: 1.6; }
.not-found p { color: var(--muted); font-size: 14px; }
.return-link { display: inline-block; margin-top: 24px; }

@media (prefers-color-scheme: dark) {
  :root { --bg: #1c2022; --surface: #1c2022; --text: #e1e3e3; --muted: #abb8bd; --accent: #a8d9c2; --mint: #638b79; --line: #394247; --soft: #263731; --heading: #282f34; --notice: #342e24; --notice-text: #e9cea1; --emphasis: #f0a0a4; }
  .prose .callout-warning { border-color: #706047; }
  .prose img { background: #fff; }
}
@media (max-width: 800px) {
  .header-inner { padding: 24px; }
  .notice-inner { padding: 15px 24px; }
  .document-main { padding: 24px 24px 48px; }
  .document-layout { grid-template-columns: 1fr; gap: 30px; }
  .document-sidebar > nav { display: none; }
  .toc ol { columns: 2; column-gap: 20px; }
  .toc li { break-inside: avoid; }
  .document { padding: 0; }
  .footer-inner { padding: 30px 24px; }
  .footer-inner nav { flex-basis: 100%; order: 3; }
  .document-heading { margin-bottom: 28px; }
}
@media (max-width: 500px) {
  .wordmark { font-size: 20px; }
  .wordmark .brand-logo { width: 190px; }
  .help-link { flex: 0 0 90px; }
  .notice-inner { padding: 14px 20px; }
  .help-link { font-size: 10px; max-width: 105px; text-align: right; }
  .home-main { padding: 44px 22px; }
  .intro > p { font-size: 15px; }
  .intro .intro-description { font-size: 13px; }
  .document-list { margin-top: 32px; }
  .document-row { grid-template-columns: 24px 1fr 20px; gap: 12px; padding: 24px 2px; }
  .document-row h2 { font-size: 18px; }
  .document-row p { font-size: 12px; }
  .eyebrow { font-size: 9px; }
  .help-note { padding: 20px; }
  .document-main { padding: 20px 20px 40px; }
  .breadcrumbs { font-size: 10px; margin-bottom: 26px; }
  .toc ol { columns: 1; }
  .prose { font-size: 14px; }
  .prose h2 { font-size: 21px; }
  .prose h2[id^="block-"] { font-size: 19px; }
  .prose h3 { font-size: 18px; }
  .prose h4 { font-size: 15px; }
  .prose th, .prose td { padding: 10px; font-size: 12px; }
  .prose .callout, .prose .callout-warning { padding: 18px; }
  .not-found { padding: 64px 24px; }
  .not-found h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #444; --accent: #000; --mint: #aaa; --line: #bbb; --soft: #f5f5f5; --heading: #f5f5f5; --emphasis: #000; color-scheme: light; }
  .site-header, .site-footer, .document-sidebar, .breadcrumbs, .back-top, .skip-link { display: none; }
  .document-main { max-width: none; padding: 0; }
  .document-layout { display: block; }
  .document { padding: 0; }
  .document-heading { margin-bottom: 20px; }
  .prose { font-size: 10pt; line-height: 1.7; }
  .prose h2, .prose h3, .prose h4 { break-after: avoid; }
  .prose figure, .prose tr { break-inside: avoid; }
  .preview-banner { font-size: 9pt; }
  .home-main { padding: 0; }
  .document-row { break-inside: avoid; }
  .prose a { text-decoration: underline; }
}
