/*
 * 補助金レーダー — shared styles (static pages, server-rendered pages, profile app)
 * Design: the vocabulary of a Japanese official document (公募要領・様式). 紺 (navy) ink on cool paper,
 * Mincho headings like an official notice, and 朱 (seal vermilion) reserved for deadlines
 * and the "合" seal that marks a match. System fonts only (no external requests).
 */

/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #f3f5f7;
  --paper: #ffffff;
  --ink: #1a2433;
  --ink-2: #4a5566;
  --ink-3: #6b7685;
  --rule: #d5dce4;
  --rule-strong: #b7c2cf;
  --kon: #223a70;
  --kon-hover: #182b55;
  --kon-wash: #e8edf6;
  --on-kon: #ffffff;
  --shu: #b4381f;
  --shu-hover: #96301a;
  --shu-wash: #fbede8;
  --ok: #1f6b43;
  --ok-wash: #e6f2ea;
  --focus: #e0a500;

  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic Medium",
    "Yu Gothic", "YuGothic", Meiryo, system-ui, sans-serif;
  --font-mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP",
    "BIZ UDPMincho", serif;

  --measure: 36em;
  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 6px;
  --space-section: clamp(3.5rem, 8vw, 6.5rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1620;
    --paper: #17212d;
    --ink: #e8edf3;
    --ink-2: #a9b6c6;
    --ink-3: #8794a5;
    --rule: #2a3747;
    --rule-strong: #3b4b5f;
    --kon: #9fc1f0;
    --kon-hover: #bcd4f5;
    --kon-wash: #1d2b40;
    --on-kon: #0f1620;
    --shu: #ff9e80;
    --shu-hover: #ffb8a3;
    --shu-wash: #3a221c;
    --ok: #8fd1ab;
    --ok-wash: #16302a;
    --focus: #ffd24d;
  }
}

/* -------------------------------------------------------------------- base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  line-break: strict;
  overflow-wrap: anywhere;
  text-autospace: normal;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-mincho);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
  font-feature-settings: "palt";
  word-break: auto-phrase;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

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

a {
  color: var(--kon);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--kon-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

strong {
  font-weight: 700;
}

small {
  font-size: 0.875rem;
}

[hidden] {
  display: none !important;
}

.vh {
  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-link {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--paper);
  color: var(--kon);
  border: 2px solid var(--kon);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.5rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.todo {
  background: var(--shu-wash);
  color: var(--shu);
  font-weight: 700;
  padding: 0 0.2em;
  border-radius: 2px;
}

/* ------------------------------------------------------------------ header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: var(--kon);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.brand__arc {
  stroke-width: 2;
}

.brand__ping {
  fill: var(--shu);
  stroke: none;
}

.brand__name {
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  font-size: 0.9375rem;
}

.site-nav__item {
  display: none;
}

.site-nav__link {
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav__link:hover {
  color: var(--kon);
  text-decoration: underline;
}

@media (min-width: 52rem) {
  .site-nav__item {
    display: list-item;
  }
}

/* ----------------------------------------------------------------- buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 3rem;
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--kon);
  border-radius: var(--radius);
  background: var(--kon);
  color: var(--on-kon);
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--kon-hover);
  border-color: var(--kon-hover);
  color: var(--on-kon);
  text-decoration: none;
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: progress;
}

.button--secondary {
  background: transparent;
  color: var(--kon);
}

.button--secondary:hover {
  background: var(--kon-wash);
  color: var(--kon);
}

.button--danger {
  background: var(--shu);
  border-color: var(--shu);
  color: var(--paper);
}

.button--danger:hover {
  background: var(--shu-hover);
  border-color: var(--shu-hover);
  color: var(--paper);
}

.button--small {
  min-height: 2.5rem;
  padding: 0.35rem 1rem;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.button--block {
  width: 100%;
}

/* ------------------------------------------------------------------- hero */
.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.hero__title {
  font-size: clamp(1.875rem, 1.1rem + 3.4vw, 3rem);
  line-height: 1.4;
}

.hero__title span {
  display: inline-block;
}

.hero__lead {
  margin-top: 1.5rem;
  max-width: 30em;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* Feed illustration: the day's notices, with matches stamped. */
.feed {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgb(26 36 51 / 0.45);
}

.feed__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 2px solid var(--ink);
  font-family: var(--font-mincho);
  font-weight: 700;
}

.feed__list {
  list-style: none;
  padding: 0.25rem 0;
}

.feed__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.25rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px dashed var(--rule);
  color: var(--ink-3);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.feed__item:last-child {
  border-bottom: 0;
}

.feed__org {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.feed__item--match {
  background: var(--kon-wash);
  color: var(--ink);
  font-weight: 700;
}

.feed__item--match .feed__org {
  color: var(--ink-2);
  font-weight: 400;
}

.feed__seal {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--shu);
  border-radius: 50%;
  color: var(--shu);
  font-family: var(--font-mincho);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-12deg);
}

.feed__foot {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-2);
}

@media (prefers-reduced-motion: no-preference) {
  .feed__item--noise {
    animation: feed-quiet 0.8s ease-out 0.5s backwards;
  }

  .feed__item--match {
    animation: feed-light 0.6s ease-out 0.9s backwards;
  }

  .feed__seal {
    animation: feed-stamp 0.32s cubic-bezier(0.3, 1.6, 0.6, 1) 1.1s backwards;
  }

  .feed__seal--2 {
    animation-delay: 1.32s;
  }

  .feed__seal--3 {
    animation-delay: 1.54s;
  }
}

@keyframes feed-quiet {
  from {
    color: var(--ink);
  }
}

@keyframes feed-light {
  from {
    background: transparent;
  }
}

@keyframes feed-stamp {
  from {
    opacity: 0;
    transform: rotate(-12deg) scale(1.9);
  }
}

/* ---------------------------------------------------------------- sections */
.section {
  padding-block: var(--space-section);
}

.section--paper {
  background: var(--paper);
  border-block: 1px solid var(--rule);
}

.section__head {
  max-width: var(--measure);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__title {
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);
}

.section__lead {
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1em;
}

/* Pain points */
.pain {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56rem) {
  .pain {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 4rem;
  }

  .pain .section__head {
    margin-bottom: 0;
  }
}

.pain-list {
  list-style: none;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.pain-list__item {
  padding: 1.1rem 0 1.1rem 2rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.pain-list__item::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.85rem;
  width: 0.85rem;
  height: 2px;
  background: var(--shu);
}

.pain-list__item strong {
  display: block;
  font-size: 1.0625rem;
}

.pain-list__item span {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* How it works: a real sequence, so numbered */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
  border-top: 2px solid var(--ink);
}

@media (min-width: 52rem) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .steps__item + .steps__item {
    border-left: 1px solid var(--rule);
  }
}

.steps__item {
  counter-increment: step;
  padding: 1.5rem 1.25rem 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 52rem) {
  .steps__item {
    padding: 1.5rem 1.5rem 1.75rem;
    border-bottom: 0;
  }

  .steps__item:first-child {
    padding-left: 0;
  }
}

.steps__item::before {
  content: counter(step);
  display: block;
  font-family: var(--font-mincho);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--kon);
  margin-bottom: 0.85rem;
}

.steps__title {
  font-size: 1.1875rem;
  margin-bottom: 0.5rem;
}

.steps__text {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* Target segments */
.segments {
  display: grid;
  gap: 0;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule-strong);
}

@media (min-width: 44rem) {
  .segments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
  }
}

@media (min-width: 64rem) {
  .segments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.segments__item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.segments__item dt {
  font-weight: 700;
}

.segments__item dd {
  margin: 0.25rem 0 0;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.75;
}

.aside-note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* ---------------------------------------------------------- sample email */
.sample {
  display: grid;
  gap: 2rem;
}

@media (min-width: 60rem) {
  .sample {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: 4rem;
    align-items: start;
  }
}

.tag {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  vertical-align: middle;
}

.tag--sample {
  color: var(--shu);
  background: var(--paper);
}

.mail {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.mail__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.mail__chrome-note {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.mail__meta {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.875rem;
  line-height: 1.7;
}

.mail__meta div {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
}

.mail__meta dt {
  color: var(--ink-3);
}

.mail__meta dd {
  margin: 0;
}

.mail__subject {
  font-weight: 700;
}

.mail__body {
  padding: 1.25rem;
}

.mail__intro {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.mail-item {
  margin-top: 1.25rem;
  padding: 1.1rem 1.1rem 1rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--kon);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.mail-item--urgent {
  border-left-color: var(--shu);
}

.mail-item__title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.mail-item__link {
  color: var(--kon);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.mail-item__org {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.mail-item__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 0.6rem;
  font-size: 0.8125rem;
}

.mail-item__facts div {
  display: flex;
  gap: 0.4em;
}

.mail-item__facts dt {
  color: var(--ink-3);
}

.mail-item__facts dd {
  margin: 0;
}

.deadline {
  font-weight: 700;
}

.deadline--urgent {
  color: var(--shu);
}

.mail-item__summary {
  margin-top: 0.75rem;
  padding-left: 1.1em;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.mail-item__reason {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: var(--kon-wash);
  border-radius: 4px;
  font-size: 0.875rem;
  line-height: 1.7;
}

.mail-item__extra {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.7;
}

.verify {
  color: var(--shu);
  font-weight: 700;
}

.mail-item__feedback {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.fake-button {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

/* "変更のお知らせ" block at the top of the sample email */
.mail-change {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--shu);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--shu-wash);
}

.mail-change__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.tag--change {
  color: var(--shu);
  background: var(--paper);
}

.mail-change__title {
  margin-top: 0.4rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
}

.mail-change__diff {
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

.mail-change__diff s {
  color: var(--ink-3);
}

.mail__reminder {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.mail__reminder h4 {
  font-size: 1rem;
}

.mail__reminder p {
  margin-top: 0.35rem;
  font-size: 0.875rem;
}

.mail__foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--ink-3);
  line-height: 1.7;
}

/* ----------------------------------------------------------------- pricing */
.pricing {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 64rem) {
  .pricing {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 3.5rem;
    align-items: start;
  }
}

.table-scroll {
  overflow-x: auto;
}

.plans {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--paper);
}

.plans caption {
  text-align: left;
  font-size: 0.875rem;
  color: var(--ink-2);
  padding-bottom: 0.5rem;
}

.plans th,
.plans td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.plans thead th {
  border-bottom: 2px solid var(--ink);
  vertical-align: bottom;
}

.plans tbody th {
  font-weight: 400;
  color: var(--ink-2);
  width: 34%;
}

.plans__name {
  display: block;
  font-family: var(--font-mincho);
  font-size: 1.1875rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 40rem) {
  .plans {
    font-size: 0.875rem;
  }

  .plans th,
  .plans td {
    padding: 0.7rem 0.5rem;
  }

  .plans tbody th {
    width: 30%;
  }

  .plans__name {
    font-size: 1rem;
  }

  .plans__price strong {
    font-size: 1.25rem;
  }
}

.plans__price {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-2);
  word-break: keep-all;
}

.plans__price strong {
  font-size: 1.5rem;
  color: var(--ink);
  font-feature-settings: "tnum";
  letter-spacing: 0;
}

.plans__col--standard {
  background: var(--kon-wash);
}

.yes {
  color: var(--ok);
  font-weight: 700;
}

.no {
  color: var(--ink-3);
}

.order {
  background: var(--paper);
  border: 2px solid var(--kon);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.order__title {
  font-size: 1.3125rem;
}

.order__lead {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.order__form {
  margin-top: 1.25rem;
}

.order__terms {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  border-top: 1px solid var(--rule);
}

.order__terms div {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.order__terms dt {
  color: var(--ink-2);
}

.order__terms dd {
  margin: 0;
}

/* -------------------------------------------------------------- notes, FAQ */
.notes {
  list-style: none;
  padding: 0;
  max-width: 48rem;
  border-top: 2px solid var(--ink);
}

.notes li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.notes strong {
  display: block;
}

.notes span {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.faq {
  max-width: 48rem;
  border-top: 2px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  position: relative;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 1.45rem;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--kon);
  border-bottom: 2px solid var(--kon);
  transform: rotate(45deg);
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  top: 1.75rem;
}

.faq__answer {
  padding: 0 0 1.25rem;
  color: var(--ink-2);
}

.faq__answer > * + * {
  margin-top: 0.75em;
}

/* ------------------------------------------------------------------- forms */
.form {
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field__label {
  font-weight: 700;
}

.field__optional {
  margin-left: 0.5em;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-3);
}

.field__hint {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.7;
}

.field__error {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--shu);
}

.field__error:empty {
  display: none;
}

.input {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
}

.input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--kon);
}

.input[aria-invalid="true"] {
  border-color: var(--shu);
  border-width: 2px;
}

textarea.input {
  min-height: 12rem;
  resize: vertical;
}

select.input,
.select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

.counter {
  justify-self: end;
  font-size: 0.8125rem;
  color: var(--ink-3);
  font-feature-settings: "tnum";
}

.counter--over {
  color: var(--shu);
  font-weight: 700;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  line-height: 1.6;
}

.check input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  accent-color: var(--kon);
}

.form__note {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ signup */
.signup {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 60rem) {
  .signup {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }
}

.application {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-top: 4px solid var(--kon);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.application__title {
  font-size: 1.3125rem;
  margin-bottom: 1.25rem;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  padding-block: 2.5rem 3rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-2);
}

.site-footer--compact {
  padding-block: 1.5rem 2rem;
}

.site-footer__credit {
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
}

.site-footer__links a {
  color: var(--ink-2);
}

.site-footer__meta {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  max-width: 48rem;
}

.site-footer__meta p + p {
  margin-top: 0.35rem;
}

/* ---------------------------------------- notice pages (results, messages) */
.notice {
  padding: clamp(2rem, 7vw, 5rem) var(--gutter);
}

.notice__panel {
  max-width: 38rem;
  margin-inline: auto;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-top: 4px solid var(--kon);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: clamp(1.5rem, 5vw, 2.75rem);
}

.notice--wide .notice__panel {
  max-width: 52rem;
}

.notice__title {
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
}

.notice__lead {
  margin-top: 1rem;
}

.notice__steps {
  margin-top: 1.25rem;
  padding-left: 1.4em;
}

.notice__steps li + li {
  margin-top: 0.4rem;
}

.notice__subject {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border-left: 4px solid var(--kon);
  font-weight: 700;
}

.notice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.notice__form {
  margin-top: 1.75rem;
}

.notice__small {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.notice__divider {
  margin-block: 2rem 1.5rem;
  border: 0;
  border-top: 1px solid var(--rule);
}

.callout {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--shu-wash);
  border-left: 4px solid var(--shu);
  font-size: 0.9375rem;
}

.callout p + p {
  margin-top: 0.5rem;
}

.callout--info {
  background: var(--kon-wash);
  border-left-color: var(--kon);
}

.callout--ok {
  background: var(--ok-wash);
  border-left-color: var(--ok);
}

/* ----------------------------------------------------------------- profile */
.profile {
  padding-block: clamp(2rem, 5vw, 3.5rem) 0;
}

.profile__head {
  max-width: var(--measure);
}

.profile__title {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
}

.profile__intro {
  margin-top: 0.75rem;
  color: var(--ink-2);
}

.profile__account {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.profile__layout {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 64rem) {
  .profile__layout {
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 3rem;
    align-items: start;
  }
}

.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.panel + .panel {
  margin-top: 1.25rem;
}

.fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.fieldset__legend {
  padding: 0;
  font-family: var(--font-mincho);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.fieldset__intro {
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.choice-grid {
  display: grid;
  gap: 0.6rem 1.5rem;
}

@media (min-width: 40rem) {
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.choice-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.45rem 1.25rem;
  margin-top: 0.75rem;
}

.choice-grid--compact .check {
  font-size: 0.9375rem;
}

.fieldset--nested > legend {
  padding: 0;
  margin-bottom: 0.4rem;
}

.panel > .form + .fieldset,
.panel > .fieldset + .form {
  margin-top: 1.75rem;
}

.profile form > .callout {
  margin: 0 0 1.25rem;
}

.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 1.5rem;
  padding: 0.85rem var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

@media (min-width: 64rem) {
  .save-bar {
    margin-inline: 0;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding-inline: 1.25rem;
  }
}

.save-bar__status {
  font-size: 0.9375rem;
  font-weight: 700;
}

.save-bar__status--ok {
  color: var(--ok);
}

.save-bar__status--error {
  color: var(--shu);
}

.side h2 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.side p,
.side li {
  font-size: 0.875rem;
  color: var(--ink-2);
}

.side ul {
  padding-left: 1.2em;
}

.side li + li {
  margin-top: 0.35rem;
}

.side__actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.loading {
  padding: 3rem 0;
  color: var(--ink-2);
}

/* ------------------------------------------------------------- legal pages */
.legal {
  max-width: 48rem;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(3rem, 8vw, 5rem);
}

.legal h1 {
  font-size: clamp(1.625rem, 1.25rem + 1.6vw, 2.25rem);
}

.legal__updated {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.legal__intro {
  margin-top: 1.5rem;
}

.legal h2 {
  margin-top: 2.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule-strong);
  font-size: 1.25rem;
}

.legal h3 {
  margin-top: 1.75rem;
  font-size: 1.0625rem;
}

.legal p,
.legal ol,
.legal ul {
  margin-top: 0.85rem;
}

.legal ol,
.legal ul {
  padding-left: 1.6em;
}

.legal li + li {
  margin-top: 0.35rem;
}

.legal ol ol {
  list-style: lower-alpha;
}

.legal-table {
  width: 100%;
  margin-top: 1.5rem;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.9375rem;
}

.legal-table th,
.legal-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  width: 30%;
  background: var(--bg);
  font-weight: 700;
}

@media (max-width: 40rem) {
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table td {
    border-top: 0;
  }

  .legal-table tr + tr th {
    border-top: 0;
  }
}

/* Generated digest pages (written by the pipeline) inherit the base above. */

@media print {
  .site-header,
  .site-footer,
  .save-bar,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
