:root {
    --bone: #F7F4EE;
    --bone-warm: #F0EBE0;
    --bone-deep: #E8E1D0;
    --ink: #1C1A17;
    --ink-soft: #4A453E;
    --ink-mute: #8C8579;
    --hairline: #D8D2C4;
    --asibi-green: #2C8146;
    --asibi-green-deep: #1F6E3A;
    --line-green: #06C755;
    --serif: 'Shippori Mincho', serif;
    --sans: 'Zen Kaku Gothic New', sans-serif;
    --max: 1080px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    font-family: var(--sans);
    background: var(--bone);
    color: var(--ink);
    line-height: 1.95;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }
  body::after {
    content: ''; position: fixed; inset: 0;
    background-image: url("/img/support-svg-01.svg");
    opacity: 0.3; pointer-events: none; z-index: 1;
    mix-blend-mode: multiply;
  }
  ::selection { background: var(--asibi-green); color: var(--bone); }
  a { color: inherit; text-decoration: none; }
  img { max-width: 100%; display: block; }
  strong { font-weight: 600; color: var(--ink); }

  /* ========== NAV ========== */
  .nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(247, 244, 238, 0.92);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid rgba(216, 210, 196, 0.5);
  }
  .nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 32px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
  }
  .nav-brand { display: flex; align-items: center; gap: 14px; }
  .nav-brand-logo { height: 22px; width: auto; }
  .nav-tabs { display: flex; gap: 28px; }
  .nav-tabs a {
    font-family: var(--serif);
    font-size: 14px;
    color: var(--ink-soft);
    letter-spacing: 0.06em;
    transition: color 0.2s;
  }
  .nav-tabs a:hover { color: var(--asibi-green); }
  .nav-cta {
    font-family: var(--serif);
    font-size: 13px;
    color: white;
    background: var(--ink);
    padding: 10px 20px;
    border-radius: 999px;
    letter-spacing: 0.1em;
    transition: background 0.2s;
  }
  .nav-cta:hover { background: var(--asibi-green); }

  /* ========== DOC HERO ========== */
  .doc-hero {
    background: white;
    padding: 72px 32px 56px;
    position: relative; z-index: 2;
    border-bottom: 1px solid var(--hairline);
  }
  .doc-hero-inner { max-width: var(--max); margin: 0 auto; }
  .doc-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-family: var(--serif);
    font-size: 13px;
    color: var(--asibi-green);
    letter-spacing: 0.2em;
    margin-bottom: 22px;
  }
  .doc-hero-eyebrow::before {
    content: ''; width: 24px; height: 1px; background: var(--asibi-green);
  }
  .doc-hero h1 {
    font-family: var(--serif);
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    color: var(--ink);
  }
  .doc-hero-lead {
    font-family: var(--serif);
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 2.2;
    color: var(--ink-soft);
    max-width: 680px;
  }
  .doc-meta {
    display: flex; flex-wrap: wrap; gap: 10px 28px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--hairline);
  }
  .doc-meta div {
    font-family: var(--serif);
    font-size: 13px;
    color: var(--ink-mute);
    letter-spacing: 0.04em;
  }
  .doc-meta strong { color: var(--ink); font-weight: 600; margin-left: 8px; }

  /* ========== DOC LAYOUT ========== */
  .doc-wrap { position: relative; z-index: 2; }
  .doc-layout {
    max-width: var(--max);
    margin: 0 auto;
    padding: 56px 32px 80px;
    display: grid;
    grid-template-columns: 248px 1fr;
    gap: 56px;
    align-items: start;
  }

  /* ---- TOC ---- */
  .doc-toc {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .doc-toc-title {
    font-family: var(--serif);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--asibi-green);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
  }
  .doc-toc ol { list-style: none; }
  .doc-toc li { margin: 0; }
  .doc-toc a {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 6px 0 6px 12px;
    border-left: 2px solid transparent;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-soft);
    transition: color 0.18s, border-color 0.18s;
  }
  .doc-toc a:hover { color: var(--asibi-green); }
  .doc-toc a.active {
    color: var(--asibi-green);
    border-left-color: var(--asibi-green);
    font-weight: 500;
  }
  .toc-num {
    flex-shrink: 0;
    font-family: var(--serif);
    font-size: 11px;
    color: var(--ink-mute);
    letter-spacing: 0.02em;
    min-width: 38px;
  }
  .doc-toc a.active .toc-num { color: var(--asibi-green); }
  .toc-title { font-family: var(--sans); }

  /* ---- ARTICLES ---- */
  .doc-main { min-width: 0; }
  .doc-intro {
    background: var(--bone-warm);
    border-left: 3px solid var(--asibi-green);
    padding: 22px 26px;
    margin-bottom: 44px;
    font-family: var(--serif);
    font-size: 14px;
    line-height: 2.05;
    color: var(--ink-soft);
  }
  .doc-intro strong { color: var(--ink); }

  .article {
    padding: 0 0 38px;
    margin-bottom: 38px;
    border-bottom: 1px solid var(--hairline);
    scroll-margin-top: 88px;
  }
  .article:last-of-type { border-bottom: none; }
  .article-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
  }
  .article-num {
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: var(--asibi-green);
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
  .article-title {
    font-family: var(--serif);
    font-size: clamp(19px, 2.4vw, 23px);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.04em;
    line-height: 1.5;
  }
  .article-body { font-size: 15px; color: var(--ink-soft); }
  .article-body p { margin-bottom: 14px; }
  .article-body p:last-child { margin-bottom: 0; }
  .article-body strong { color: var(--ink); }
  .article-body a {
    color: var(--asibi-green);
    border-bottom: 1px solid rgba(44,129,70,0.35);
  }

  /* numbered legal list */
  ol.legal-list {
    list-style: none;
    counter-reset: legal;
    margin: 0;
  }
  ol.legal-list > li {
    counter-increment: legal;
    position: relative;
    padding-left: 34px;
    margin-bottom: 14px;
    line-height: 2.0;
  }
  ol.legal-list > li::before {
    content: counter(legal);
    position: absolute;
    left: 0; top: 0;
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--asibi-green);
    background: var(--bone-warm);
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    margin-top: 6px;
  }
  ol.legal-list > li:last-child { margin-bottom: 0; }

  /* sub bullet list */
  ul.legal-sub {
    list-style: none;
    margin: 12px 0 6px;
    padding: 0;
  }
  ul.legal-sub > li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 9px;
    line-height: 1.95;
    font-size: 14.5px;
  }
  ul.legal-sub > li::before {
    content: '';
    position: absolute;
    left: 2px; top: 14px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--asibi-green);
    opacity: 0.65;
  }

  /* definition list */
  dl.legal-def { margin: 4px 0 0; }
  dl.legal-def dt {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--ink);
    font-size: 15px;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
  }
  dl.legal-def dd {
    margin: 0 0 16px;
    padding-left: 16px;
    border-left: 2px solid var(--hairline);
    line-height: 1.95;
  }
  dl.legal-def dd:last-child { margin-bottom: 0; }
  dl.legal-def dd a {
    color: var(--asibi-green);
    border-bottom: 1px solid rgba(44,129,70,0.35);
  }

  .legal-note {
    margin-top: 16px;
    padding: 14px 18px;
    background: rgba(247, 244, 238, 0.7);
    border-left: 2px solid var(--ink-mute);
    font-size: 14px;
    line-height: 1.95;
    color: var(--ink-soft);
  }
  .legal-muted { color: var(--ink-mute); font-size: 13px; }

  /* business info block */
  .biz-block {
    margin-top: 8px;
    background: white;
    border: 1px solid var(--hairline);
    padding: 30px 32px;
  }
  .biz-block .article-head { margin-bottom: 16px; }

  .doc-foot-note {
    margin-top: 40px;
    font-family: var(--serif);
    font-size: 13px;
    color: var(--ink-mute);
    line-height: 2;
    letter-spacing: 0.02em;
  }

  /* ========== FOOTER ========== */
  .footer {
    background: var(--ink);
    color: var(--bone);
    padding: 56px 32px 40px;
    position: relative; z-index: 2;
  }
  .footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
  }
  .footer-brand img {
    height: 20px; width: auto;
    margin-bottom: 16px;
  }
  .footer-brand p {
    font-family: var(--serif);
    font-size: 13px;
    line-height: 2;
    color: rgba(247, 244, 238, 0.7);
  }
  .footer-col h4 {
    font-family: var(--serif);
    font-size: 13px;
    color: rgba(247, 244, 238, 0.6);
    letter-spacing: 0.16em;
    margin-bottom: 18px;
    font-weight: 500;
  }
  .footer-col a {
    display: block;
    font-family: var(--serif);
    font-size: 14px;
    color: rgba(247, 244, 238, 0.85);
    padding: 6px 0;
    transition: color 0.2s;
    letter-spacing: 0.04em;
  }
  .footer-col a:hover { color: white; }
  .footer-bottom {
    max-width: var(--max);
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(247, 244, 238, 0.15);
    font-family: var(--serif);
    font-size: 12px;
    color: rgba(247, 244, 238, 0.5);
    letter-spacing: 0.12em;
    text-align: center;
  }

  /* back to top */
  .to-top {
    position: fixed;
    right: 24px; bottom: 24px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    display: flex; align-items: center; justify-content: center;
    z-index: 90;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s, background 0.2s, transform 0.2s;
    box-shadow: 0 6px 20px rgba(28,26,23,0.25);
  }
  .to-top.visible { opacity: 1; pointer-events: auto; }
  .to-top:hover { background: var(--asibi-green); transform: translateY(-2px); }

  /* ========== Responsive ========== */
  @media (max-width: 880px) {
    .doc-layout { grid-template-columns: 1fr; gap: 8px; padding: 32px 24px 64px; }
    .doc-toc {
      position: static;
      max-height: none;
      margin-bottom: 32px;
      background: white;
      border: 1px solid var(--hairline);
      padding: 20px 22px;
    }
    .doc-toc-details summary {
      list-style: none;
      cursor: pointer;
      display: flex; align-items: center; justify-content: space-between;
      font-family: var(--serif);
      font-size: 13px;
      letter-spacing: 0.16em;
      color: var(--asibi-green);
    }
    .doc-toc-details summary::-webkit-details-marker { display: none; }
    .doc-toc-details summary::after {
      content: '+';
      font-size: 18px; color: var(--ink-mute);
    }
    .doc-toc-details[open] summary::after { content: '−'; }
    .doc-toc-title { display: none; }
    .doc-toc ol { margin-top: 16px; }
    .doc-toc-details:not([open]) ol { display: none; }
  }
  @media (max-width: 768px) {
    .nav-tabs { display: none; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
    .doc-hero { padding: 50px 24px 44px; }
  }
  @media (max-width: 480px) {
    .nav-cta { font-size: 12px; padding: 8px 14px; }
    .footer-inner { grid-template-columns: 1fr; }
    .article-num { font-size: 12px; padding: 3px 10px; }
    ol.legal-list > li { padding-left: 30px; }
  }

  /* desktop: hide the mobile <summary> toggle text */
  @media (min-width: 881px) {
    .doc-toc-details > summary { display: none; }
    .doc-toc-details[open] ol, .doc-toc-details ol { display: block; }
  }
