/* 経営相談 いしずえ舎（デモ）
   方眼紙の地・黒の線・赤ペン。赤は丸・下線・書き込みだけで、面を塗らない。 */
:root {
  --grid: #E8EEF5;
  --line: #C9D6E6;
  --line-5: #B7C7DB;
  --ink: #1E2226;
  --ink-2: #4A525B;
  --red: #D33F3F;
  --paper: #FFFFFF;
  --jp: "Zen Kaku Gothic Antique", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --mono: "IBM Plex Mono", "Zen Kaku Gothic Antique", ui-monospace, monospace;
  --wrap: 1120px;
  --ease: cubic-bezier(.35, .1, .25, 1);
  --pen-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8C40 4 70 9 110 6S170 3 198 7' fill='none' stroke='%23D33F3F' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--jp);
  font-size: clamp(15px, 0.9rem + 0.25vw, 17px);
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--grid);
  background-image:
    linear-gradient(var(--line-5) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-5) 1px, transparent 1px),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: center top;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; font-feature-settings: "palt"; line-height: 1.4; }
ul, ol { margin: 0; padding: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pc { display: none; }
@media (min-width: 960px) { .pc { display: inline; } }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 40px, 820px); }

/* ---------- ヘッダー ---------- */
.head { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--ink); }
.head__in { width: min(100% - 32px, 1240px); margin-inline: auto; height: 72px; display: flex; align-items: center; gap: 14px; }
.brand { display: block; line-height: 0; text-decoration: none; }
.logo { display: block; height: 44px; width: auto; overflow: visible; color: var(--ink); }
.logo__sub { font: 700 11px var(--jp); fill: currentColor; }
.logo__name { font: 700 27px var(--jp); fill: currentColor; }
.demo { font: 500 10px/1 var(--mono); letter-spacing: .08em; border: 1px solid var(--ink-2); color: var(--ink-2); padding: 3px 5px 2px; align-self: center; }
.gnav { margin-left: auto; }
.gnav ul { list-style: none; display: flex; gap: 4px; }
.gnav a { position: relative; display: block; padding: 10px 12px; text-decoration: none; font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.gnav a:hover { color: var(--ink-2); }
.gnav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 8px;
  background: var(--pen-line) no-repeat center / 100% 100%;
}
.head__btn { margin-left: 8px; }
.menu { display: none; }

@media (max-width: 1000px) {
  .menu {
    display: flex; align-items: center; gap: 8px; margin-left: auto;
    background: none; border: 1px solid var(--ink); padding: 9px 12px; font: 500 12px var(--mono); color: var(--ink); cursor: pointer;
  }
  .menu__bars, .menu__bars::before, .menu__bars::after { display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: transform .25s var(--ease), opacity .2s; }
  .menu__bars::before, .menu__bars::after { content: ""; position: absolute; left: 0; }
  .menu__bars::before { top: -6px; } .menu__bars::after { top: 6px; }
  .is-menu .menu__bars { background: transparent; }
  .is-menu .menu__bars::before { transform: translateY(6px) rotate(45deg); }
  .is-menu .menu__bars::after { transform: translateY(-6px) rotate(-45deg); }
  .gnav {
    position: fixed; inset: 72px 0 auto 0; margin: 0; background: var(--paper); border-bottom: 1px solid var(--ink);
    padding: 8px 20px 20px; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
  }
  .is-menu .gnav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s var(--ease); }
  .gnav ul { flex-direction: column; gap: 0; }
  .gnav li + li { border-top: 1px dashed var(--line-5); }
  .gnav a { padding: 14px 4px; font-size: 16px; }
  .gnav a[aria-current="page"]::after { left: 4px; right: auto; width: 6em; bottom: 6px; }
  .head__btn { margin-left: 0; }
}
@media (max-width: 600px) {
  .head__in { height: 64px; gap: 10px; }
  .gnav { inset: 64px 0 auto 0; }
  html { scroll-padding-top: 76px; }
  .logo { height: 38px; }
  .head .head__btn { display: none; }
}

/* ---------- ボタン・文字のリンク ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  background: var(--ink); color: #fff; text-decoration: none; border-radius: 0;
  padding: 11px 18px; font-size: 15px; font-weight: 700; letter-spacing: .03em; border: 1px solid var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink-2); }
.btn--lg { padding: 17px 28px; font-size: 16px; }
.fuki { width: 22px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.tlink {
  display: inline-block; font-weight: 700; text-decoration: none; padding-bottom: 6px;
  background: var(--pen-line) no-repeat left bottom / 100% 8px;
}
.tlink:hover { color: var(--ink-2); }
.links .tlink + .tlink, .endlinks > * + * { margin-left: 28px; }
.endlinks { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 0; margin-top: 36px; }

/* ---------- 区画 ---------- */
.sec { padding: clamp(56px, 7vw, 96px) 0; }
.pg { display: flex; align-items: flex-end; gap: 10px; font: 500 13px/1 var(--mono); margin-bottom: 14px; color: var(--ink); }
.pg__tick {
  display: inline-block; width: 56px; height: 10px; border-bottom: 1px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 8px) left bottom / 100% 6px no-repeat,
              linear-gradient(90deg, var(--ink) 0 1px, transparent 1px) left bottom / 40px 10px repeat-x;
}
.h2 { font-size: clamp(24px, 1.2rem + 1.4vw, 36px); letter-spacing: .02em; margin-bottom: 28px; }
.body { max-width: 40em; }
.small { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; margin-top: 14px; }
.cut {
  width: min(100% - 40px, var(--wrap)); margin-inline: auto; height: 1px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 5px);
}
.sheet { background: var(--paper); border: 1px solid var(--ink); }
.sheet--plain { padding: clamp(24px, 4vw, 44px); }
.sheet--big { padding: clamp(28px, 5vw, 64px); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin-top: 36px; }
@media (max-width: 760px) { .cols2 { grid-template-columns: 1fr; } }

/* 赤ペンの下線（見出しの一部） */
.pen { position: relative; white-space: nowrap; }
.pen::after {
  content: ""; position: absolute; left: -2px; right: -4px; bottom: -.16em; height: .3em;
  background: var(--pen-line) no-repeat center / 100% 100%; transform-origin: left center;
}
.js .pen::after { transform: scaleX(0); animation: pen .8s var(--ease) .5s forwards; }
@keyframes pen { to { transform: scaleX(1); } }

/* ---------- 最初の画面 ---------- */
.hero {
  min-height: 85vh; display: grid; grid-template-columns: 9fr 11fr; align-items: center; gap: clamp(24px, 3vw, 48px);
  width: min(100% - 40px, 1280px); margin-inline: auto; padding: clamp(32px, 5vh, 64px) 0;
}
.hero__paper { background: var(--paper); border: 1px solid var(--ink); padding: clamp(28px, 3.4vw, 52px); }
.hero__eyebrow { font-size: 12.5px; letter-spacing: .04em; margin-bottom: 22px; color: var(--ink-2); }
.hero__title { font-size: clamp(26px, 1.1rem + 1.3vw, 36px); line-height: 1.5; letter-spacing: .01em; margin-bottom: 24px; }
.hero__lead { margin-bottom: 32px; }
@media (min-width: 960px) { .hero__title .ln1 { white-space: nowrap; } }
.hero__title { word-break: auto-phrase; text-wrap: pretty; }
@media (max-width: 1180px) and (min-width: 960px) { .hero__title { font-size: 28px; } }
.hero__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.hero__fig .dg { margin: 0; }
@media (max-width: 959px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
}

/* ---------- 図 ---------- */
.dg { margin: 36px 0 28px; }
.dg svg { display: block; width: 100%; height: auto; border: 1px solid var(--line-5); background: var(--grid); }
.dg__n { display: none !important; }
@media (max-width: 700px) {
  .dg__w { display: none !important; }
  .dg__n { display: block !important; }
}
.dg figcaption { font-size: 14px; margin-top: 10px; color: var(--ink); }
.dg .ln { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: round; }
.dg .ln.thin { stroke-width: 1.1; }
.dg .ln.red { stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; }
.dg .ln.ground { stroke: #7F95AF; stroke-width: 2.6; }
.dg .dot { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 4; }
.dg text { font-family: var(--jp); fill: var(--ink); font-weight: 400; }
.dg text.b { font-weight: 700; }
.dg text.m { font-family: var(--mono); font-weight: 500; }
.dg text.r { fill: var(--red); font-weight: 700; }
.js .dg .ln { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .dg .ln.red { stroke-linecap: butt; }
.js .dg.is-in .ln { stroke-dashoffset: 0; transition: stroke-dashoffset .55s var(--ease) var(--d, 0s); }
.js .dg.is-in .ln.red { stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease) var(--d, 0s), stroke-linecap 0s var(--d, 0s); }
.js .dg .fx { opacity: 0; }
.js .dg.is-in .fx { opacity: 1; transition: opacity .45s ease var(--d, 0s); }
.dg--hero svg { border-color: var(--ink); }
.dg--s1 { margin-top: 8px; }

/* ---------- ノートの書き込み ---------- */
.note {
  padding: 10px clamp(20px, 4vw, 40px);
  background-image: linear-gradient(#EEF2F7 1px, transparent 1px), linear-gradient(90deg, #EEF2F7 1px, transparent 1px);
  background-size: 24px 24px;
  margin-bottom: 28px;
}
.note__list { list-style: none; }
.note__list li { position: relative; padding: 16px 0 16px 40px; border-bottom: 1px solid #D6DFEA; font-size: clamp(15px, .9rem + .3vw, 18px); line-height: 1.7; }
.note__list li:last-child { border-bottom: 0; }
.chk { position: absolute; left: 0; top: 18px; width: 26px; height: 22px; fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.note--sq .note__list li::before { content: ""; position: absolute; left: 6px; top: 1.6em; width: 9px; height: 9px; background: var(--ink); }
.note--dash .note__list li::before { content: ""; position: absolute; left: 4px; top: 1.75em; width: 16px; height: 1.5px; background: var(--ink); }

/* ---------- 表 ---------- */
.sheet--table { padding: 0; overflow: hidden; margin-bottom: 8px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { border-bottom: 1px solid var(--ink); padding: 18px 20px; text-align: left; vertical-align: top; line-height: 1.7; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th + td, .tbl td + td { border-left: 1px solid var(--line-5); }
.tbl thead th { font-size: 12.5px; font-weight: 500; color: var(--ink-2); padding-top: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.tbl thead th + th { border-left: 1px solid var(--line-5); }
.tbl tbody th { font-weight: 700; white-space: nowrap; }
.tbl td.mono { white-space: nowrap; }
.tbl--three tbody th { width: 13em; }
.tbl--price td { text-align: right; width: 12em; }
.tbl--price td.num { font-size: 20px; }
.tbl--two th { width: 9em; font-weight: 700; }
.tbl--week tbody th, .tbl--kai tbody th, .tbl--year tbody th { width: 7em; font-weight: 500; }
.fee { white-space: nowrap; text-align: right; }
.fee__main { display: block; font-size: 20px; }
.fee__sub { display: block; font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 700px) {
  .tbl thead { display: none; }
  .tbl tr { display: block; border-bottom: 1px solid var(--ink); padding: 14px 18px; }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl th, .tbl td { display: block; border: 0 !important; padding: 2px 0; width: auto !important; text-align: left !important; white-space: normal; }
  .tbl tbody th { margin-bottom: 4px; }
  .tbl--price td.num, .fee__main { font-size: 18px; }
  .tbl td.mono { margin-top: 4px; }
}

/* ---------- お金の流れの図の区画 ---------- */
.zu__text { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin-top: 8px; }
.zu__text .small, .zu__text p:last-child { grid-column: 1 / -1; }
@media (max-width: 760px) { .zu__text { grid-template-columns: 1fr; } }

/* ---------- 代表から ---------- */
.daihyo__in { display: grid; grid-template-columns: 5fr 7fr; gap: 32px 64px; align-items: start; }
.daihyo__who { display: flex; gap: 18px; align-items: flex-start; margin: 0; }
.daihyo__mark { width: 64px; height: 64px; flex: none; color: var(--ink); }
.daihyo__who > span { display: flex; flex-direction: column; gap: 4px; }
.daihyo__nm { font-size: clamp(22px, 1rem + 1vw, 28px); font-weight: 700; letter-spacing: .06em; line-height: 1.3; }
.daihyo__title { font-weight: 700; }
.daihyo__reg { font-size: 12px; color: var(--ink-2); }
.daihyo__text { padding-top: 8px; }
@media (max-width: 800px) { .daihyo__in { grid-template-columns: 1fr; } }

/* ---------- よく聞かれること ---------- */
.faq { margin: 0 0 28px; }
.faq__item { margin-bottom: 26px; }
.faq dt { font-weight: 700; font-size: clamp(16px, .95rem + .3vw, 19px); padding-left: 22px; position: relative; margin-bottom: 10px; }
.faq dt::before { content: ""; position: absolute; left: 0; top: .82em; width: 12px; height: 1.5px; background: var(--ink); }
.faq dd { margin: 0; padding: 20px clamp(18px, 3vw, 28px); }

/* ---------- 場所 ---------- */
.basho__in { display: grid; grid-template-columns: 6fr 5fr; gap: 0 40px; align-items: start; }
.basho__in .h2, .basho__in .endlinks { grid-column: 1 / -1; }
.basho__map { margin: 0; }
@media (max-width: 900px) { .basho__in { grid-template-columns: 1fr; } .basho__map { margin-top: 24px; } }

/* ---------- 下層の頭 ---------- */
.phead { padding: clamp(56px, 8vw, 104px) 0 clamp(44px, 6vw, 72px); }
.phead__no { display: flex; align-items: flex-end; gap: 10px; font-size: 13px; line-height: 1; margin-bottom: 18px; }
.phead__title { font-size: clamp(36px, 1.4rem + 3.2vw, 64px); letter-spacing: .03em; line-height: 1.25; padding-bottom: 22px; margin-bottom: 26px; position: relative; }
.phead__title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: min(100%, 520px); height: 12px; border-bottom: 1.5px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10px) left bottom / 100% 6px no-repeat,
              linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px) left bottom / 50px 12px repeat-x;
}
.phead__body { max-width: 38em; font-size: clamp(16px, .95rem + .3vw, 18px); }
.person { display: flex; align-items: center; gap: clamp(18px, 3vw, 32px); margin-top: 8px; }
.person__mark { width: clamp(84px, 12vw, 132px); height: auto; aspect-ratio: 1; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); padding: 10px; }
.person__name { font-size: clamp(30px, 1.2rem + 2.4vw, 48px); font-weight: 700; letter-spacing: .1em; line-height: 1.2; margin: 0 0 8px; }
.person__reg { font-size: clamp(12px, .7rem + .2vw, 14px); margin: 0; color: var(--ink-2); }

/* ---------- 会社を見る ---------- */
.watasu { display: grid; grid-template-columns: 7fr 5fr; gap: 0 48px; align-items: start; }
.watasu__h { grid-column: 1 / -1; }
.watasu__fig { margin-top: 0; }
.watasu__text { padding-top: 4px; }
.olist { padding-left: 1.6em; margin: 0 0 8px; }
.olist li { margin-bottom: 12px; padding-left: 4px; }
.olist li::marker { font-family: var(--mono); font-weight: 500; }
@media (max-width: 900px) { .watasu { grid-template-columns: 1fr; } }
.two-h { display: grid; gap: 56px; }
.after .h2 { margin-bottom: 20px; }

/* ---------- 事業計画づくり ---------- */
.steps { padding: 4px clamp(18px, 3vw, 36px); }
.steps__row { display: grid; grid-template-columns: 19em 1fr; gap: 6px 32px; padding: 20px 0; border-bottom: 1px solid #D6DFEA; }
.steps__row:last-child { border-bottom: 0; }
.steps__row p { margin: 0; }
.steps__name { font-size: 17px; line-height: 1.6; }
.steps__name .mono { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 2px; }
@media (max-width: 760px) { .steps__row { grid-template-columns: 1fr; } }
.calc { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 8px 0; margin-bottom: 8px; }
.calc__row { display: grid; grid-template-columns: 15em 1fr; gap: 4px 24px; align-items: baseline; padding: 18px 0; margin: 0; border-bottom: 1px dashed var(--line-5); }
.calc__row:last-child { border-bottom: 0; }
.calc__lb { font-weight: 700; }
.calc__ex { font-size: clamp(16px, .9rem + .5vw, 21px); }
.calc__row--say { display: block; font-weight: 700; }
.calc__ans { position: relative; font-weight: 500; display: inline-block; padding: 0 4px; margin-left: 6px; }
.calc__ans::after {
  content: ""; position: absolute; inset: -12px -16px -10px -14px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60' preserveAspectRatio='none'%3E%3Cpath d='M20 12C44 3 92 4 108 18C121 31 104 52 66 55C30 58 6 48 7 32C8 18 30 8 58 7' fill='none' stroke='%23D33F3F' stroke-width='2.4' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
@media (max-width: 700px) { .calc__row { grid-template-columns: 1fr; } }
.sec--paper { padding: clamp(40px, 6vw, 72px) 0; }

/* ---------- 相談の流れ ---------- */
.yoyaku { position: relative; padding: clamp(28px, 5vw, 56px); }
.yoyaku__loop { position: absolute; top: -26px; right: -16px; width: 130px; height: 88px; fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; overflow: visible; }
.yoyaku .h2 { margin-bottom: 14px; }
.yoyaku__big { font-size: clamp(22px, 1rem + 1.2vw, 30px); font-weight: 700; margin-bottom: 22px; }
.yoyaku .olist { margin-bottom: 28px; }
@media (max-width: 600px) { .yoyaku__loop { right: -6px; width: 96px; } }

/* ---------- 料金 ---------- */
.rules { display: grid; gap: 52px; }
.rules .h2 { margin-bottom: 18px; }
.rules .endlinks { margin-top: 0; }

/* ---------- 事務所と代表 ---------- */
.namae { display: grid; grid-template-columns: 5fr 6fr; gap: 24px 56px; align-items: center; }
.namae__fig { margin: 0; }
@media (max-width: 820px) { .namae { grid-template-columns: 1fr; } }
.letter { padding: clamp(24px, 4vw, 48px); }
.letter p:last-child { margin-bottom: 0; }

/* ---------- フッター ---------- */
.foot { background: var(--ink); color: #fff; padding: 64px 0 40px; margin-top: 24px; }
.foot__in { display: grid; grid-template-columns: 1fr auto; gap: 40px; }
.foot__logo { display: inline-block; line-height: 0; margin-bottom: 24px; }
.logo--foot { color: #fff; }
.foot__info { margin: 0; font-size: 14px; display: grid; gap: 6px; }
.foot__info div { display: grid; grid-template-columns: 7em 1fr; gap: 12px; }
.foot__info dt { color: #B9C2CC; }
.foot__info dd { margin: 0; }
.foot__info a { text-decoration: none; }
.foot__nav { list-style: none; display: grid; gap: 4px; align-content: start; }
.foot__nav a { text-decoration: none; font-size: 14px; display: inline-block; padding: 4px 0; }
.foot__nav a:hover { text-decoration: underline; }
.foot__note { font-size: 12.5px; color: #B9C2CC; margin-top: 40px; padding-top: 20px; border-top: 1px dashed #59616B; }
@media (max-width: 700px) {
  .foot__in { grid-template-columns: 1fr; }
  .foot__info div { grid-template-columns: 1fr; gap: 0; }
  .foot__info dd { margin-bottom: 8px; }
}

/* ---------- 出てくる動き（JS があるときだけ） ---------- */
.js .fade { opacity: 0; transform: translateY(14px); }
.js .fade.is-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s var(--ease); }

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