:root {
  color-scheme: light;
  --py-blue-900: #162c40;
  --py-blue-800: #1f4e79;
  --py-blue-700: #2d6fa3;
  --py-blue-500: #3776ab;
  --py-yellow: #ffd343;
  --ink: #1f2933;
  --muted: #5d6b7a;
  --line: #d5dde5;
  --paper: #ffffff;
  --soft: #f3f6f9;
  --green: #4b8f29;
  --violet: #7b5aa6;
  --shadow: 0 18px 45px rgba(15, 31, 46, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.65;
}

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

code,
pre {
  font-family: Consolas, "Cascadia Mono", "SFMono-Regular", monospace;
}

.site-header {
  background: var(--py-blue-900);
  color: #f8fafc;
}

.network-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #111c28;
}

.network-link {
  position: relative;
  min-height: 44px;
  display: grid;
  place-items: center;
  color: #d7e2ed;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.network-link::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--py-blue-500);
}

.network-link.yellow::before {
  background: var(--py-yellow);
}

.network-link.green::before {
  background: var(--green);
}

.network-link.violet::before {
  background: var(--violet);
}

.network-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 24px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  display: grid;
  width: 74px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  color: var(--py-blue-900);
  background: linear-gradient(135deg, #ffffff 0 48%, var(--py-yellow) 48% 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
  font-weight: 500;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: #c7d7e6;
  font-size: 14px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 5px;
  color: #0b1b2b;
  background: #f7f7f7;
  font-size: 14px;
  font-weight: 700;
}

.status-chip.warn {
  background: var(--py-yellow);
}

.main-nav {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-radius: 7px 7px 0 0;
  overflow: hidden;
  background: linear-gradient(#3f8fc8, #2d6fa3);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.16);
}

.main-nav a {
  min-height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-right: 1px solid rgba(19, 65, 100, 0.45);
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(12, 44, 70, 0.22);
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.94fr) minmax(320px, 1.06fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(42px, 8vw, 78px) clamp(18px, 5vw, 72px);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 211, 67, 0.18), transparent 30%),
    linear-gradient(135deg, #23435f, #1f5c89 55%, #2f78aa);
  color: #ffffff;
}

.terminal-card {
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #17212d;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-copy {
  min-width: 0;
}

.terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #0f1720;
  color: #d8e6f0;
}

.terminal-toolbar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5f7180;
}

.terminal-toolbar span:nth-child(1) {
  background: #e56565;
}

.terminal-toolbar span:nth-child(2) {
  background: var(--py-yellow);
}

.terminal-toolbar span:nth-child(3) {
  background: #68b55b;
}

.terminal-toolbar strong {
  margin-left: 8px;
  font-size: 14px;
  font-weight: 600;
}

.terminal-card pre {
  margin: 0;
  padding: clamp(18px, 3vw, 28px);
  overflow-x: auto;
  color: #f7f7f7;
  font-size: clamp(13px, 1.8vw, 16px);
}

.terminal-card code {
  white-space: pre;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--py-yellow);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  font-weight: 500;
  overflow-wrap: anywhere;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  font-weight: 500;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.lead {
  color: #e0edf8;
  font-size: 18px;
  max-width: 720px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 5px;
  font-weight: 800;
}

.button.primary {
  color: #13283a;
  background: linear-gradient(#ffe27a, var(--py-yellow));
}

.button.secondary {
  color: #ffffff;
  background: linear-gradient(#3f8fc8, var(--py-blue-700));
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.affiliation-note {
  color: #c8d7e5;
  font-size: 14px;
}

.quick-links,
.section {
  padding: clamp(40px, 7vw, 78px) clamp(18px, 5vw, 72px);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.quick-links article {
  border-top: 4px solid #79a8cf;
  padding-top: 18px;
}

.quick-links article:nth-child(2) {
  border-color: var(--py-yellow);
}

.quick-links article:nth-child(3) {
  border-color: #86b76e;
}

.quick-links article:nth-child(4) {
  border-color: var(--violet);
}

.quick-links h2 {
  font-size: 22px;
}

.quick-links p,
.section p,
.requirements {
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(320px, 1.35fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid article,
.allmark-panel,
.deploy-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.card-grid article {
  padding: 20px;
}

.card-grid article h3 {
  color: var(--py-blue-800);
}

.code-section {
  background: #edf3f8;
}

.domain-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(330px, 0.86fr);
  gap: 22px;
  align-items: start;
}

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

.domain-grid button {
  min-height: 58px;
  padding: 12px;
  border: 1px solid #b9c8d6;
  border-radius: 6px;
  color: #143047;
  background: linear-gradient(#ffffff, #f1f6fb);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.domain-grid button[aria-pressed="true"] {
  color: #ffffff;
  border-color: #1d5f8f;
  background: linear-gradient(#3e8fc6, #2b6f9d);
}

.allmark-panel {
  padding: clamp(18px, 3vw, 26px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.panel-head strong {
  color: var(--ink);
}

.meter {
  height: 13px;
  margin: 18px 0 18px;
  overflow: hidden;
  border-radius: 7px;
  background: #d9e2ea;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--py-blue-500), var(--green), var(--py-yellow));
  transition: width 160ms ease;
}

.domain-meter {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.domain-meter li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}

.domain-meter .unmeasured {
  color: var(--muted);
  background: #f8fafc;
}

.note {
  margin-top: 14px;
  font-size: 14px;
}

.flow-diagram {
  display: grid;
  grid-template-columns: 1fr 28px 1fr 28px 1fr 28px 1fr;
  align-items: center;
  gap: 8px;
}

.flow-diagram div {
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  text-align: center;
  color: var(--ink);
  font-weight: 800;
}

.flow-diagram small {
  color: var(--muted);
  font-weight: 500;
}

.flow-diagram span {
  height: 2px;
  background: var(--py-blue-500);
}

.dark-section {
  background: #172f46;
  color: #ffffff;
}

.dark-section p {
  color: #d8e7f4;
}

.dark-section .card-grid article {
  background: #ffffff;
  color: var(--ink);
}

.dark-section .card-grid article p {
  color: var(--muted);
}

.requirements {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.requirements li {
  padding: 14px 16px;
  border-left: 5px solid var(--py-blue-500);
  border-radius: 7px;
  background: #ffffff;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-list article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.faq-list h3 {
  color: var(--py-blue-800);
}

.cloudflare-section {
  background: #fff9e8;
}

.deploy-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(300px, 1.1fr);
  gap: 22px;
  padding: 22px;
}

.deploy-panel pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 6px;
  color: #f8fafc;
  background: #17212d;
}

.deploy-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.availability {
  background: #ffffff;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: #cbd5e1;
  background: #111c28;
  font-size: 14px;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(42px, 8vw, 78px) clamp(18px, 5vw, 72px);
  background: linear-gradient(135deg, #23435f, #1f5c89 55%, #2f78aa);
  color: #ffffff;
}

.product-summary {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(17, 28, 40, 0.42);
}

.product-summary h2 {
  font-size: 26px;
}

.product-summary ul,
.timeline {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-summary li {
  padding-left: 18px;
  color: #e0edf8;
}

.product-summary li::marker {
  color: var(--py-yellow);
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--py-blue-800);
  font-weight: 800;
}

.text-link::after {
  content: " >";
}

.timeline article {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.timeline strong {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #13283a;
  background: var(--py-yellow);
}

.exam-app {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(320px, 1fr);
  gap: 18px;
}

.exam-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.exam-panel label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 700;
}

.exam-panel input,
.exam-panel select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #b9c8d6;
  border-radius: 5px;
  padding: 8px 10px;
  font: inherit;
}

.button.small {
  min-height: 36px;
  border: 0;
  cursor: pointer;
}

.hero-buttons.compact {
  margin: 12px 0 0;
}

.hero-buttons button {
  border: 0;
  cursor: pointer;
}

.hero-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.check-row {
  grid-template-columns: 20px 1fr !important;
  align-items: start;
  color: var(--ink) !important;
}

.check-row input {
  min-height: auto;
  margin-top: 6px;
}

.result-panel {
  grid-column: 1 / -1;
}

.result-panel ol {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 22px;
}

.result-panel pre {
  min-height: 220px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border-radius: 6px;
  color: #f8fafc;
  background: #17212d;
}

@media (max-width: 940px) {
  .brand-row,
  .hero-buttons,
  .site-footer {
    align-items: flex-start;
  }

  .brand-row,
  .hero,
  .product-hero,
  .two-col,
  .domain-workbench,
  .deploy-panel,
  .exam-app {
    grid-template-columns: 1fr;
  }

  .brand-row {
    display: grid;
  }

  .main-nav,
  .quick-links,
  .card-grid.three {
    grid-template-columns: 1fr 1fr;
  }

  .flow-diagram {
    grid-template-columns: 1fr;
  }

  .flow-diagram span {
    width: 2px;
    height: 24px;
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .network-bar,
  .main-nav,
  .quick-links,
  .card-grid.three,
  .domain-grid,
  .role-grid {
    grid-template-columns: 1fr;
  }

  .network-link {
    min-height: 36px;
  }

  .brand {
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .status-chip {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .brand-mark {
    width: 58px;
    height: 46px;
  }

  .hero-copy {
    order: -1;
  }

  h1 {
    font-size: 32px;
  }

  .hero,
  .quick-links,
  .section {
    padding: 34px 16px;
  }
}
