:root {
  --color-text: #142033;
  --color-muted: #5d6a7c;
  --color-line: #d6e0ec;
  --color-bg: #f4f8fc;
  --color-surface: #fff;
  --color-brand: #075bff;
  --color-brand-dark: #0040b8;
  --color-accent: #00a3d7;
  --color-error: #c62828;
  --color-error-bg: #fff1f1;
  --shadow: 0 18px 36px rgba(11, 53, 112, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.6;
  background: var(--color-bg);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--color-brand);
  font-weight: 900;
}

.nav {
  gap: 4px;
}

.nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-brand);
  background: #e8f2ff;
}

.page {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero,
.panel,
.support-panel,
.complete-card {
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 32px;
}

.start-hero {
  align-items: center;
}

.panel,
.support-panel,
.complete-card {
  margin-top: 24px;
  padding: 28px;
}

.complete-card {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
}

h2,
h3 {
  font-size: 22px;
}

h3 {
  margin: 10px 0 6px;
  font-size: 17px;
}

.lead,
.hint,
.notice-list,
.support-panel p {
  color: var(--color-muted);
}

.lead {
  max-width: 720px;
  margin: 14px 0 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--color-brand);
  background: #e8f2ff;
  font-size: 13px;
  font-weight: 800;
}

.steps li.is-muted {
  color: var(--color-muted);
  background: #eef2f7;
}

.notice-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-left: 1.2em;
}

.section-heading {
  margin-bottom: 22px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.overview-item {
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: #fbfdff;
}

.overview-item p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.item-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--color-accent);
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

label,
legend {
  font-weight: 800;
}

.required {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #a61919;
  background: #ffe4e4;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-text);
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 120px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(7, 91, 255, 0.16);
  border-color: var(--color-brand);
}

input.is-error,
select.is-error,
textarea.is-error,
.fieldset.is-error {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}

.hint {
  margin: 0;
  font-size: 13px;
}

.input-with-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.input-with-button button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.input-with-button button,
.secondary-button {
  border: 1px solid var(--color-line);
  color: var(--color-text);
  background: #fff;
}

.primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--color-brand), var(--color-brand-dark));
  box-shadow: 0 10px 22px rgba(7, 91, 255, 0.22);
}

.fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
}

.check-row,
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 600;
}

.check-row input,
.consent input {
  width: 20px;
  min-height: 20px;
  margin-top: 3px;
}

.error-message {
  min-height: 18px;
  margin: 0;
  color: var(--color-error);
  font-size: 13px;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.form-error-summary {
  display: none;
  margin: 0;
  color: var(--color-error);
  font-weight: 800;
}

.form-error-summary.is-visible {
  display: block;
}

.confirm-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  overflow: hidden;
}

.confirm-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  margin: 0;
  border-bottom: 1px solid var(--color-line);
}

.confirm-row:last-child {
  border-bottom: 0;
}

.confirm-row dt,
.confirm-row dd {
  margin: 0;
  padding: 14px 16px;
}

.confirm-row dt {
  color: var(--color-muted);
  background: #f5f8fc;
  font-weight: 800;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .form-grid,
  .overview-grid,
  .confirm-row {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    padding: 14px 16px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero {
    align-items: start;
    padding: 24px;
  }

  .steps {
    justify-content: flex-start;
  }

  .panel,
  .support-panel {
    padding: 22px;
  }

  .input-with-button {
    grid-template-columns: 1fr;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
