:root {
    color-scheme: light;
    --blue: #17598A;
    --blue-deep: #0F4168;
    --blue-soft: #E3EEF7;
    --ink: #14283B;
    --muted: #52667A;
    --line: #DCE5EE;
    --mist: #F2F6FA;
    --white: #FFFFFF;

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --gutter: clamp(20px, 5vw, 40px);
    --section-space: clamp(64px, 9vw, 104px);
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 88px; }
  body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss03";
  }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; }

  :focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 4px;
  }

  .wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
  .section { padding-block: var(--section-space); }
  .section.flush-top { padding-top: 0; }

  .skip {
    position: absolute; left: -999px; top: 8px;
    background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 30;
  }
  .skip:focus { left: 8px; }

  h1, h2, h3 { font-family: var(--font); margin: 0; color: var(--ink); }
  h1 { font-size: clamp(2.25rem, 5vw, 3.6rem); line-height: 1.1; font-weight: 600; letter-spacing: -0.035em; }
  h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; }
  h3 { font-size: 1.25rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
  p { margin: 0; }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 24px;
    background: var(--blue); color: #fff;
    font: 600 1rem/1 var(--font);
    text-decoration: none;
    border-radius: 10px;
    transition: background-color .15s ease;
  }
  .btn:hover { background: var(--blue-deep); }
  .link {
    font-weight: 600; color: var(--blue);
    text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px;
    text-decoration-color: var(--blue-soft);
    transition: text-decoration-color .15s ease;
  }
  .link:hover { text-decoration-color: var(--blue); }

  .site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
  .brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
  .brand img { width: 34px; height: auto; }
  .brand span { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.03em; color: var(--blue); }
  .nav { display: flex; align-items: center; gap: 28px; }
  .nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .98rem; color: var(--muted); }
  .nav a:not(.btn):hover { color: var(--ink); }
  .nav .btn { padding: 11px 18px; font-size: .95rem; }

  .hero { padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 88px); }
  .hero .wrap {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(40px, 6vw, 80px); align-items: center;
  }
  .hero-copy p.lead { margin-top: 24px; max-width: 48ch; font-size: 1.15rem; color: var(--muted); }
  .hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

  .flow { background: var(--mist); border-radius: 24px; padding: clamp(20px, 3.5vw, 36px); }
  .panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
    width: 88%;
  }
  .panel-dns { margin-right: auto; }
  .panel-live { margin-left: auto; }

  .tube { width: 100%; height: 88px; overflow: visible; }
  .tube path {
    fill: none; stroke: var(--blue); stroke-width: 12; stroke-linecap: round;
    vector-effect: non-scaling-stroke;
  }

  .p-title { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
  .p-sub { margin-top: 2px; font-size: .93rem; color: var(--muted); }
  .tube.flip { transform: scaleX(-1); }

  @media (prefers-reduced-motion: no-preference) {
    .js .flow .tube path { stroke-dasharray: 1; stroke-dashoffset: 1; }
    .js .flow .step { opacity: 0; }
    .flow.in .tube path {
      animation: draw .8s cubic-bezier(.5, 0, .2, 1) forwards;
      animation-delay: var(--d, .3s);
    }
    .flow.in .step { animation: arrive .5s ease forwards; animation-delay: var(--d, 0s); }
    @keyframes draw { to { stroke-dashoffset: 0; } }
    @keyframes arrive { to { opacity: 1; } }
  }

  .section-head { max-width: 40rem; }
  .section-head p { margin-top: 16px; color: var(--muted); max-width: 54ch; }
  .rows { margin-top: 48px; border-bottom: 1px solid var(--line); }
  .row {
    display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 12px 48px; padding-block: 32px; border-top: 1px solid var(--line);
  }
  .row p { max-width: 60ch; color: var(--muted); }
  .row p + p { margin-top: 10px; }
  .row .fine { font-size: .95rem; color: var(--ink); }

  .allin { background: var(--mist); }
  .allin .wrap {
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 6vw, 80px); align-items: start;
  }
  .allin .intro p { margin-top: 16px; color: var(--muted); max-width: 40ch; }
  .parts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
  .parts dt { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
  .parts dd { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }

  .steps {
    list-style: none; margin: 56px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
    counter-reset: step;
  }
  .steps li { position: relative; padding-top: 32px; border-top: 2px solid var(--line); counter-increment: step; }
  .steps li::before {
    content: counter(step);
    position: absolute; top: -18px; left: 0;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--blue); color: #fff;
    display: grid; place-items: center;
    font: 700 .95rem/1 var(--font);
  }
  .steps h3 { font-size: 1.15rem; }
  .steps p { margin-top: 8px; color: var(--muted); max-width: 34ch; }

  .contact { background: var(--blue); color: #fff; }
  .contact .wrap {
    display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(32px, 6vw, 80px); align-items: start;
  }
  .contact h2 { color: #fff; }
  .contact .intro p { margin-top: 16px; color: #D5E5F3; max-width: 40ch; }
  .contact .intro .addr { margin-top: 28px; font-size: .95rem; }
  .contact .intro .addr a { color: #fff; text-underline-offset: 4px; }
  .contact :focus-visible { outline-color: #fff; }

  .form {
    background: var(--white); color: var(--ink);
    border-radius: 16px; padding: clamp(20px, 3.5vw, 32px);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px;
  }
  .form .full { grid-column: 1 / -1; }
  .field label { display: block; font-weight: 500; font-size: .93rem; margin-bottom: 6px; }
  .field .opt { color: var(--muted); font-weight: 400; }
  .field input, .field select, .field textarea {
    width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
    background: var(--white); border: 1px solid #C3D0DD; border-radius: 10px;
    padding: 12px 14px;
  }
  .field input, .field select { height: 52px; }
  .field textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
  .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
    outline: 3px solid var(--blue-soft); outline-offset: 0; border-color: var(--blue);
  }
  .form .btn { width: 100%; padding: 16px 24px; font-size: 1.05rem; cursor: pointer; border: 0; }
  .alt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .93rem; color: var(--muted); }
  .alt button {
    font: inherit; font-weight: 600; color: var(--blue); background: none; border: 0; padding: 4px 0; cursor: pointer;
    text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--blue-soft);
  }
  .alt button:hover { text-decoration-color: var(--blue); }
  .form-note { font-size: .9rem; color: var(--muted); }

  .site-footer { padding-block: 28px; font-size: .95rem; color: var(--muted); }
  .site-footer a { text-decoration: none; }
  .site-footer a:hover { color: var(--ink); text-decoration: underline; }
  .site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }

  @media (max-width: 900px) {
    .hero .wrap, .contact .wrap, .allin .wrap { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  }
  @media (max-width: 720px) {
    .row { grid-template-columns: minmax(0, 1fr); padding-block: 26px; }
  }
  @media (max-width: 560px) {
    .parts { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .form { grid-template-columns: minmax(0, 1fr); }
  }

  .nav a[aria-current="page"] { color: var(--ink); }
  .page-head { padding-block: clamp(44px, 7vw, 80px) clamp(28px, 4vw, 40px); }
  .page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
  .page-head p { margin-top: 16px; max-width: 54ch; color: var(--muted); font-size: 1.1rem; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-bottom: var(--section-space); }
  .card {
    display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 100%;
    background: var(--white); color: var(--ink); font: inherit; cursor: pointer;
    border: 1px solid var(--line); border-radius: 16px; padding: 26px;
    transition: border-color .15s ease, background-color .15s ease;
  }
  .card:hover { border-color: var(--blue); background: var(--mist); }
  .card .kind {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    background: var(--blue-soft); color: var(--blue-deep); font-size: .85rem; font-weight: 500;
  }
  .card .name { display: block; margin-top: 18px; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
  .card .sum { display: block; margin-top: 10px; color: var(--muted); }
  .card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
  .card .tags span { font-size: .85rem; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: var(--white); }
  .card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-weight: 600; color: var(--blue); }
  .card .more svg { width: 16px; height: 16px; transition: transform .15s ease; }
  .card:hover .more svg { transform: translateX(3px); }

  dialog.detail {
    border: 0; padding: 0; border-radius: 20px; color: var(--ink); background: var(--white);
    width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto;
  }
  dialog.detail::backdrop { background: rgba(20, 40, 59, .55); }
  body:has(dialog[open]) { overflow: hidden; }
  .dlg-inner { padding: clamp(24px, 4vw, 40px); }
  .dlg-close {
    position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: var(--mist); color: var(--ink); cursor: pointer;
  }
  .dlg-close:hover { background: var(--blue-soft); }
  .dlg-close svg { width: 18px; height: 18px; }
  .dlg-inner h2 { font-size: clamp(1.6rem, 3vw, 2rem); padding-right: 44px; }
  .dlg-inner .tag { margin-top: 6px; color: var(--blue); font-weight: 500; }
  .dlg-inner h3 { margin-top: 32px; font-size: 1.1rem; }
  .dlg-inner p.copy { margin-top: 10px; color: var(--muted); }
  .dlg-inner ul { margin: 12px 0 0; padding-left: 1.2rem; }
  .dlg-inner li { margin-top: 8px; padding-left: 4px; }
  .dlg-inner li::marker { color: var(--blue); }
  .built { margin: 14px 0 0; border-top: 1px solid var(--line); }
  .built > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .built dt { font-weight: 600; }
  .built dd { margin: 0; color: var(--muted); }
  .dlg-inner .fine { margin-top: 28px; font-size: .93rem; color: var(--muted); }

  @media (prefers-reduced-motion: no-preference) {
    dialog.detail[open] { animation: pop .22s ease; }
    dialog.detail[open]::backdrop { animation: fade .22s ease; }
    @keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
    @keyframes fade { from { opacity: 0; } }
  }

  .cta { background: var(--blue); color: #fff; }
  .cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
  .cta h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
  .cta p { margin-top: 8px; color: #D5E5F3; }
  .cta .btn { background: #fff; color: var(--blue); }
  .cta .btn:hover { background: var(--blue-soft); }
  .cta :focus-visible { outline-color: #fff; }

  @media (max-width: 760px) {
    .cards { grid-template-columns: minmax(0, 1fr); }
    .built > div { grid-template-columns: minmax(0, 1fr); }
  }

  main p, main li, main dd {
    text-align: justify; text-justify: inter-word;
    hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 8 4 4;
    overflow-wrap: break-word; text-wrap: pretty;
  }
  .p-title, .p-sub, .addr, .form-note, .draft-panel p, .teaser p, .cta p,
  .stages-title, .alt, .page-head p {
    text-align: left; hyphens: manual; -webkit-hyphens: manual;
  }
  .done-panel p { text-align: center; hyphens: manual; -webkit-hyphens: manual; }
  @media (min-width: 561px) {
    .parts dd { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
  }
  @media (min-width: 901px) {
    .steps p { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
  }

  .linkbtn, .alt button {
    font: inherit; font-weight: 600; color: var(--blue); background: none; border: 0; padding: 4px 0; cursor: pointer;
    text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--blue-soft);
  }
  .linkbtn:hover, .alt button:hover { text-decoration-color: var(--blue); }
  .draft-panel, .done-panel { display: none; }
  .form.is-drafted .submit-row, .form.is-drafted .form-note { display: none; }
  .form.is-drafted .draft-panel { display: block; }
  .form.is-done > *:not(.done-panel) { display: none; }
  .form.is-done .done-panel { display: block; }

  .draft-panel {
    background: var(--mist); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px;
  }
  .dp-title { font-weight: 600; font-size: 1.05rem; }
  .dp-sub { margin-top: 4px; color: var(--ink); }
  .dp-actions { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
  .form .btn.btn-sm { width: auto; padding: 12px 20px; font-size: 1rem; }
  .dp-hint { margin-top: 14px; font-size: .9rem; color: var(--muted); }

  .done-panel { text-align: center; padding: 28px 8px; }
  .done-panel:focus { outline: none; }
  .done-icon {
    width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%;
    background: var(--blue-soft); color: var(--blue); display: grid; place-items: center;
  }
  .done-icon svg { width: 26px; height: 26px; }
  .done-panel h3 { font-size: 1.5rem; }
  .done-panel p { margin: 10px auto 0; max-width: 40ch; color: var(--muted); text-align: center; }
  .done-panel .linkbtn { margin-top: 18px; }

  .section.teaser { background: var(--mist); padding-block: clamp(40px, 6vw, 64px); }
  .teaser .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
  .teaser h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
  .teaser p { margin-top: 8px; color: var(--muted); max-width: 52ch; }
  .btn-outline {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border: 2px solid var(--blue); border-radius: 10px;
    color: var(--blue); font-weight: 600; text-decoration: none; background: var(--white);
    transition: background-color .15s ease, color .15s ease;
  }
  .btn-outline:hover { background: var(--blue); color: #fff; }
  .btn-outline svg { width: 16px; height: 16px; }

  @media (max-width: 560px) {
    .site-header .wrap { height: 64px; }
    html { scroll-padding-top: 80px; }
  }

  .menu-toggle {
    display: none; width: 44px; height: 44px; margin-right: -10px;
    align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 10px; color: var(--ink); cursor: pointer;
  }
  .menu-toggle:hover { background: var(--mist); }
  .menu-toggle svg { width: 24px; height: 24px; }
  .menu-toggle .i-close { display: none; }
  .menu-toggle[aria-expanded="true"] .i-open { display: none; }
  .menu-toggle[aria-expanded="true"] .i-close { display: block; }

  @media (max-width: 720px) {
    .menu-toggle { display: inline-flex; }
    .nav {
      display: none; position: absolute; top: 100%; left: 0; right: 0;
      flex-direction: column; align-items: stretch; gap: 0;
      background: var(--white); border-bottom: 1px solid var(--line);
      padding: 4px var(--gutter) 20px;
    }
    .nav.open { display: flex; }
    .nav a:not(.btn) {
      padding: 15px 0; font-size: 1.05rem; color: var(--ink);
      border-bottom: 1px solid var(--line);
    }
    .nav .btn { margin-top: 18px; padding: 15px 20px; font-size: 1rem; }
  }
