:root {
  --blue: #003e90;
  --blue-dark: #001c5c;
  --blue-pale: #f2f8ff;
  --blue-line: #9caec6;
  --ink: #1d1d1d;
  --muted: #66717f;
  --white: #fff;
  --line: #e2e2e2;
  --orange: #c35200;
  --side-width: 270px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 80px));
  margin: 0 auto;
}

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--side-width);
  background: var(--white);
  border-right: 1px solid #eef0f3;
  box-shadow: 2px 0 10px rgba(0, 28, 92, 0.06);
}

.side-nav__inner {
  display: flex;
  height: 100%;
  min-height: 700px;
  flex-direction: column;
  padding: 36px 34px 28px;
}

.side-nav__logo {
  display: block;
  width: 158px;
  margin: 0 auto 38px;
}

.side-nav__links {
  display: grid;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
}

.side-nav__links > a {
  position: relative;
  padding-left: 15px;
}

.side-nav__links > a::before {
  position: absolute;
  top: 0.83em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--blue);
  content: "";
  transform: translateY(-50%);
}

.side-nav__links a {
  transition: color 0.2s ease;
}

.side-nav__links a:hover {
  color: var(--blue);
}

.side-nav__sub {
  display: grid;
  gap: 8px;
  margin: -4px 0 3px 16px;
  font-size: 12px;
  font-weight: 400;
}

.side-nav__sub a::before {
  margin-right: 7px;
  color: var(--blue);
  content: "−";
}

.side-nav__contact {
  display: grid;
  width: 126px;
  height: 126px;
  margin: auto auto 0;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-nav__contact:hover {
  background: var(--blue-dark);
  transform: translateY(-3px);
}

.mobile-header {
  display: none;
}

.page,
.footer {
  margin-left: var(--side-width);
}

.page-hero {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background: #e9eef3;
}

.page-hero__image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 36%, rgba(255, 255, 255, 0.08) 72%),
    url("assets/images/tax_mv.png") center 42% / cover no-repeat;
}

.page-hero__wave {
  position: absolute;
  right: -3%;
  bottom: -122px;
  left: -3%;
  height: 185px;
  border-radius: 50% 45% 0 0 / 45% 42% 0 0;
  background: var(--white);
  transform: rotate(-1.4deg);
}

.page-hero__content {
  position: relative;
  z-index: 1;
  padding-top: 108px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero h1 {
  position: relative;
  margin: 0;
  padding-left: 24px;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.35;
}

.page-hero h1::before {
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 12px;
  height: 12px;
  background: var(--blue);
  content: "";
}

.page-hero__lead {
  margin: 10px 0 0 25px;
  color: #384657;
  font-size: 16px;
}

.checker-section {
  padding: 68px 0 100px;
}

.checker-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(500px, 1.55fr);
  gap: 72px;
  align-items: start;
}

.section-title {
  position: relative;
  margin: 0 0 22px;
  padding-left: 22px;
  font-size: clamp(25px, 2.5vw, 36px);
  font-weight: 500;
  line-height: 1.5;
}

.section-title::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 12px;
  height: 6px;
  background: var(--blue);
  content: "";
}

.checker-intro > p:not(.section-kicker) {
  margin: 0;
  color: #485462;
  font-size: 15px;
}

.intro-notes {
  display: grid;
  gap: 7px;
  margin: 26px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.intro-notes li::before {
  margin-right: 8px;
  color: var(--blue);
  content: "✓";
  font-weight: 700;
}

.checker-panel {
  min-height: 590px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(0, 40, 96, 0.09);
}

.checker-panel__top {
  padding: 27px 38px 0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.progress-track {
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
  background: #e7edf4;
}

.progress-track span {
  display: block;
  width: 16.66%;
  height: 100%;
  background: var(--blue);
  transition: width 0.3s ease;
}

.question-screen {
  padding: 36px 48px 42px;
}

.question-number {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
}

.question-title {
  min-height: 2.8em;
  margin: 0;
  font-size: clamp(22px, 2.2vw, 29px);
  font-weight: 500;
  line-height: 1.45;
}

.question-help {
  min-height: 1.8em;
  margin: 9px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-label {
  display: grid;
  min-height: 54px;
  grid-template-columns: 22px 1fr;
  gap: 13px;
  align-items: center;
  padding: 13px 17px;
  border: 1px solid #ccd5e0;
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  font-size: 15px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.option-label:hover {
  border-color: var(--blue);
  background: var(--blue-pale);
}

.option-label:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-pale);
  box-shadow: inset 4px 0 0 var(--blue);
}

.option-label input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.checker-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 25px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.button--primary {
  min-width: 180px;
  color: var(--white);
  background: var(--blue);
}

.button--primary:hover:not(:disabled),
.button--contact:hover {
  background: var(--blue-dark);
}

.button--primary:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.button--back {
  padding-inline: 4px;
  color: var(--muted);
  background: transparent;
}

.button--back:hover {
  color: var(--blue);
}

.button--back[hidden] {
  visibility: hidden;
}

.result-screen {
  padding: 38px 48px 46px;
}

.result-label {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.result-status {
  display: inline-flex;
  margin-top: 12px;
  padding: 4px 11px;
  border-left: 3px solid var(--blue);
  color: var(--blue);
  background: var(--blue-pale);
  font-size: 12px;
  font-weight: 700;
}

.result-status.is-urgent {
  border-color: var(--orange);
  color: var(--orange);
  background: #fff5ec;
}

.result-screen h2 {
  margin: 18px 0 10px;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1.45;
}

.result-summary {
  margin: 0 0 27px;
  color: #3e4955;
  font-size: 15px;
}

.result-detail {
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.result-detail + .result-detail {
  border-top-color: #d4dde8;
}

.result-detail h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 600;
}

.result-detail ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-detail li {
  position: relative;
  padding-left: 17px;
  font-size: 14px;
}

.result-detail li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--blue);
  content: "";
}

.result-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.result-note a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

.button--contact {
  min-width: 270px;
  color: var(--white);
  background: var(--blue);
}

.button--proceed {
  min-width: 250px;
  color: var(--white);
  background: var(--blue);
}

.button--legal {
  min-width: 250px;
  color: var(--white);
  background: #5b6674;
}

.button--legal:hover {
  background: #3f4853;
}

.button--restart {
  min-width: 180px;
  border-color: var(--blue-line);
  color: var(--blue);
  background: var(--white);
}

.button--restart:hover {
  background: var(--blue-pale);
}

.copy-message {
  min-height: 1.6em;
  margin: 12px 0 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.copy-fallback {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #d4dde8;
  background: #fbfcfe;
}

.copy-fallback summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.copy-fallback p {
  margin: 0 0 10px;
  color: #3e4955;
  font-size: 13px;
}

.copy-fallback textarea {
  width: 100%;
  min-height: 210px;
  padding: 12px;
  border: 1px solid #ccd5e0;
  border-radius: 3px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
}

.support-section {
  padding: 78px 0;
  background: var(--blue-pale);
}

.support-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 80px;
  align-items: center;
}

.support-layout img {
  width: min(100%, 320px);
  margin: 0 auto;
}

.support-copy {
  max-width: 620px;
  color: #465261;
}

.text-link {
  display: inline-flex;
  gap: 16px;
  margin-top: 16px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--blue);
  color: var(--blue);
  font-weight: 600;
}

.footer {
  color: var(--white);
  background: var(--blue-dark);
}

.footer__inner {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  gap: 70px;
  padding-top: 48px;
  padding-bottom: 42px;
}

.footer__brand img {
  width: 200px;
}

.footer__brand p {
  margin: 4px 0 0;
  color: #c8d2e2;
  font-size: 12px;
}

.footer__offices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.footer__offices strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.footer__offices p,
.footer__offices a {
  margin: 0;
  color: #dbe3ee;
  font-size: 12px;
  line-height: 1.8;
}

.footer__offices a {
  display: inline-block;
  margin-top: 5px;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.footer__bottom .container {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  color: #b8c5d8;
  font-size: 10px;
}

@media (max-width: 1170px) {
  :root {
    --side-width: 220px;
  }

  .side-nav__inner {
    padding-inline: 24px;
  }

  .checker-layout {
    gap: 42px;
  }
}

@media (max-width: 900px) {
  :root {
    --side-width: 0px;
  }

  body.menu-open {
    overflow: hidden;
  }

  .side-nav {
    width: min(320px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }

  .menu-open .side-nav {
    transform: translateX(0);
  }

  .side-nav__inner {
    min-height: 660px;
    overflow-y: auto;
  }

  .side-nav__contact {
    width: 100%;
    height: 54px;
    border-radius: 3px;
  }

  .mobile-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    display: flex;
    height: 70px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 28, 92, 0.08);
  }

  .mobile-header img {
    width: 92px;
    height: 52px;
    object-fit: contain;
  }

  .menu-button {
    position: relative;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-button span {
    position: absolute;
    left: 8px;
    width: 26px;
    height: 2px;
    background: var(--blue);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .menu-button span:nth-child(1) { top: 12px; }
  .menu-button span:nth-child(2) { top: 20px; }
  .menu-button span:nth-child(3) { top: 28px; }

  .menu-open .menu-button span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
  }

  .menu-open .menu-button span:nth-child(2) {
    opacity: 0;
  }

  .menu-open .menu-button span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
  }

  .page {
    padding-top: 70px;
  }

  .checker-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .checker-intro {
    max-width: 640px;
  }

  .support-layout {
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .page-hero {
    min-height: 258px;
  }

  .page-hero__image {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.75) 57%, rgba(255, 255, 255, 0.22) 100%),
      url("assets/images/tax_mv.png") center / cover no-repeat;
  }

  .page-hero__wave {
    bottom: -92px;
    height: 130px;
  }

  .page-hero__content {
    padding-top: 72px;
  }

  .page-hero h1 {
    font-size: 27px;
  }

  .page-hero__lead {
    font-size: 13px;
  }

  .checker-section {
    padding: 35px 0 60px;
  }

  .section-title {
    font-size: 23px;
  }

  .intro-notes {
    margin-top: 18px;
  }

  .checker-panel {
    min-height: 0;
  }

  .checker-panel__top {
    padding: 23px 22px 0;
  }

  .question-screen,
  .result-screen {
    padding: 27px 22px 30px;
  }

  .question-title {
    min-height: 0;
    font-size: 21px;
  }

  .question-help {
    margin-bottom: 18px;
  }

  .option-label {
    min-height: 51px;
    padding: 11px 13px;
    font-size: 14px;
  }

  .checker-actions {
    margin-top: 23px;
  }

  .button {
    min-height: 50px;
    padding-inline: 18px;
  }

  .button--primary {
    min-width: 150px;
  }

  .result-detail {
    padding: 19px 17px;
  }

  .result-actions {
    flex-direction: column;
  }

  .button--contact,
  .button--proceed,
  .button--legal,
  .button--restart {
    width: 100%;
  }

  .support-section {
    padding: 55px 0;
  }

  .support-layout {
    grid-template-columns: 1fr;
  }

  .support-layout img {
    width: 220px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 35px;
  }

  .footer__offices {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer__bottom .container {
    flex-direction: column;
    gap: 7px;
  }
}

@media print {
  .side-nav,
  .mobile-header,
  .page-hero,
  .checker-intro,
  .support-section,
  .footer,
  .checker-panel__top,
  .result-actions {
    display: none !important;
  }

  .page {
    margin: 0;
    padding: 0;
  }

  .checker-section {
    padding: 0;
  }

  .checker-layout {
    display: block;
  }

  .checker-panel {
    border: 0;
    box-shadow: none;
  }
}
