@font-face {
  font-family: "GPN DIN";
  src: url("./GPN-DIN-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "GPN DIN";
  src: url("./GPN-DIN-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "GPN DIN";
  src: url("./GPN-DIN-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #06213b;
  --ink-soft: #395268;
  --blue: #0077c8;
  --blue-strong: #0064ad;
  --cyan: #00aee6;
  --surface: #ffffff;
  --surface-soft: #f2f6f9;
  --line: #dce5eb;
  --focus: #ffb700;
  --shadow: 0 16px 50px rgba(3, 35, 61, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: "GPN DIN", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  background: #061e35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  width: 126px;
  height: auto;
  display: block;
}

.header-caption {
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 380px;
  padding: 72px max(20px, calc((100vw - 1180px) / 2));
  background:
    radial-gradient(circle at 82% 20%, rgba(0, 174, 230, 0.24), transparent 26%),
    linear-gradient(132deg, #061e35 0%, #073b68 72%, #0067a9 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 320px;
  height: 320px;
  right: 4vw;
  bottom: -190px;
  border: 68px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0 0 22px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 20px;
  line-height: 1.45;
}

.hero-note {
  flex: 0 0 260px;
  min-height: 132px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 18px;
}

.note-number {
  color: var(--cyan);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
}

.hero-note > span:last-child {
  font-size: 18px;
  font-weight: 500;
}

.hero-note small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.finder,
.template-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.finder {
  padding: 66px 0 80px;
}

.finder-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.finder h2,
.template-section h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.result-count {
  color: var(--ink-soft);
  font-size: 15px;
}

.segment-picker {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.segment-picker button {
  position: relative;
  min-height: 132px;
  padding: 22px 70px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(3, 35, 61, 0.04);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.segment-picker button::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 22px;
  width: 28px;
  height: 28px;
  border: 2px solid #b8c9d4;
  border-radius: 50%;
  background: white;
}

.segment-picker button:hover {
  border-color: #9fc6de;
  box-shadow: 0 14px 34px rgba(3, 35, 61, 0.08);
  transform: translateY(-1px);
}

.segment-picker button.active {
  border-color: var(--blue);
  background:
    linear-gradient(135deg, rgba(0, 174, 230, 0.09), transparent 60%),
    var(--surface);
  box-shadow: 0 14px 34px rgba(0, 119, 200, 0.12);
}

.segment-picker button.active::after {
  border-color: var(--blue);
  background:
    radial-gradient(circle, var(--blue) 0 46%, white 49% 100%);
}

.segment-picker strong {
  margin-bottom: 6px;
  color: var(--blue-strong);
  font-size: 32px;
  line-height: 1;
}

.segment-picker span {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.segment-picker small {
  margin-top: auto;
  padding-top: 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.subdivision-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.controls {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 14px;
}

.control-field > span:first-child {
  display: block;
  margin: 0 0 8px 2px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}

.input-wrap {
  position: relative;
  display: block;
}

.search-mark {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #7590a3;
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.search-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -5px;
  bottom: -3px;
  border-radius: 2px;
  background: #7590a3;
  transform: rotate(45deg);
}

.control-field input,
.control-field select {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(3, 35, 61, 0.03);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.control-field input {
  padding: 0 18px 0 50px;
}

.control-field select {
  padding: 0 44px 0 18px;
}

.control-field input:hover,
.control-field select:hover {
  border-color: #b5c7d3;
}

.control-field input::placeholder {
  color: #8196a5;
}

.controls.is-locked {
  opacity: 0.62;
}

.control-field input:disabled,
.control-field select:disabled {
  background: #eaf0f4;
  color: #778b9a;
  cursor: not-allowed;
}

.finder-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.finder-layout.is-locked {
  grid-template-columns: 1fr;
}

.block-nav {
  position: sticky;
  top: 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.block-nav button {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.block-nav button + button {
  margin-top: 2px;
}

.block-nav button:hover {
  background: #f4f8fb;
  color: var(--ink);
}

.block-nav button.active {
  background: var(--blue);
  color: white;
}

.block-nav button span {
  line-height: 1.2;
}

.block-nav button small {
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 99px;
  background: rgba(6, 33, 59, 0.08);
  color: inherit;
  font-size: 12px;
  line-height: 25px;
  text-align: center;
}

.block-nav button.active small {
  background: rgba(255, 255, 255, 0.18);
}

.coordinator-results {
  min-width: 0;
}

.coordinator-group + .coordinator-group {
  margin-top: 34px;
}

.group-title {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.group-title > span {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 99px;
  background: #dceefa;
  color: var(--blue-strong);
  font-size: 13px;
  line-height: 28px;
  text-align: center;
}

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

.coordinator-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(3, 35, 61, 0.035);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 218px;
  align-items: center;
  gap: 22px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.coordinator-card:hover {
  border-color: #bfd4e1;
  box-shadow: 0 14px 34px rgba(3, 35, 61, 0.08);
  transform: translateY(-1px);
}

.card-content {
  min-width: 0;
}

.org-name {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e5f3fb;
  color: var(--blue-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 42px;
  text-align: center;
}

.person-row > div {
  min-width: 0;
}

.person-row h4 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}

.email-copy {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue-strong);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-copy > span {
  color: #778c9b;
  font-size: 11px;
}

.mail-button {
  min-height: 50px;
  padding: 0 16px 0 18px;
  border-radius: 11px;
  background: var(--blue);
  color: white;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.mail-button:hover {
  background: var(--blue-strong);
}

.mail-button:active {
  transform: scale(0.985);
}

.button-arrow {
  font-size: 22px;
}

.empty-state {
  padding: 70px 24px;
  border: 1px dashed #b9cad5;
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}

.empty-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #e5f3fb;
  color: var(--blue);
  font-size: 26px;
  line-height: 52px;
  display: block;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.empty-state button {
  padding: 10px 16px;
  border: 1px solid var(--blue);
  border-radius: 9px;
  background: white;
  color: var(--blue);
  cursor: pointer;
}

.category-empty {
  padding-top: 54px;
  padding-bottom: 54px;
  border-style: solid;
}

.segment-mark {
  font-size: 20px;
  font-weight: 700;
}

.template-section {
  margin-bottom: 80px;
  padding: 40px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(0, 174, 230, 0.11), transparent 44%),
    #061e35;
  color: white;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(380px, 1.2fr);
  align-items: start;
  gap: 64px;
}

.template-section p {
  max-width: 440px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 17px;
  line-height: 1.5;
}

.template-section details {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.template-section summary {
  min-height: 58px;
  padding: 0 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-section summary::after {
  content: "+";
  color: var(--cyan);
  font-size: 24px;
}

.template-section details[open] summary::after {
  content: "−";
}

.template-section pre {
  margin: 0;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-family: "GPN DIN", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

footer {
  min-height: 150px;
  padding: 40px max(20px, calc((100vw - 1180px) / 2));
  background: white;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

footer img {
  width: 104px;
  height: auto;
  padding: 10px;
  border-radius: 10px;
  background: #061e35;
}

footer p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: 58px;
    padding-bottom: 58px;
    display: block;
  }

  .hero-note {
    width: min(100%, 420px);
    margin-top: 34px;
  }

  .controls {
    grid-template-columns: 1fr 300px;
  }

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

  .block-nav {
    display: none;
  }

  .template-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: calc(100% - 32px);
    min-height: 64px;
  }

  .brand-logo {
    width: 108px;
  }

  .header-caption {
    max-width: 120px;
    font-size: 12px;
    line-height: 1.2;
    text-align: right;
  }

  .hero {
    padding: 46px 20px 50px;
  }

  .hero::after {
    width: 220px;
    height: 220px;
    right: -86px;
    bottom: -120px;
    border-width: 48px;
  }

  .hero h1 {
    margin-bottom: 18px;
    font-size: clamp(40px, 13vw, 58px);
  }

  .hero p {
    font-size: 17px;
  }

  .hero-note {
    min-height: 108px;
    padding: 18px;
  }

  .note-number {
    font-size: 50px;
  }

  .finder,
  .template-section {
    width: calc(100% - 32px);
  }

  .finder {
    padding: 46px 0 56px;
  }

  .finder-heading,
  .subdivision-heading {
    margin-bottom: 22px;
    align-items: start;
    display: block;
  }

  .segment-picker {
    margin-bottom: 40px;
    gap: 10px;
  }

  .segment-picker button {
    min-height: 144px;
    padding: 18px 16px;
  }

  .segment-picker button::after {
    top: 17px;
    right: 16px;
    width: 24px;
    height: 24px;
  }

  .segment-picker strong {
    padding-right: 34px;
    font-size: 28px;
  }

  .segment-picker span {
    font-size: 13px;
  }

  .segment-picker small {
    padding-top: 10px;
    font-size: 12px;
  }

  .result-count {
    display: block;
    margin-top: 12px;
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .coordinator-group + .coordinator-group {
    margin-top: 30px;
  }

  .group-title {
    align-items: flex-start;
  }

  .group-title h3 {
    font-size: 20px;
  }

  .coordinator-card {
    padding: 18px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .org-name {
    font-size: 17px;
  }

  .person-row {
    align-items: flex-start;
  }

  .email-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .mail-button {
    min-height: 54px;
  }

  .template-section {
    margin-bottom: 48px;
    padding: 28px 22px;
    border-radius: 18px;
  }

  .template-section details {
    margin: 0 -4px;
  }

  footer {
    min-height: 136px;
    padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
