﻿:root {
  color-scheme: dark;
  --bg: #0d1117;
  --bg-elevated: #121923;
  --panel: #161f2c;
  --panel-strong: #1c2838;
  --ink: #edf3fb;
  --muted: #aab7c8;
  --subtle: #758397;
  --line: #2a384b;
  --line-strong: #40536c;
  --brand: #3dd6c6;
  --brand-soft: rgba(61, 214, 198, 0.14);
  --accent: #f6b36d;
  --danger: #ff8f8f;
  --warning-bg: rgba(246, 179, 109, 0.12);
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(160deg, rgba(61, 214, 198, 0.09), transparent 35%),
    linear-gradient(20deg, rgba(246, 179, 109, 0.08), transparent 38%),
    var(--bg);
  line-height: 1.68;
}

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

code,
kbd {
  display: inline-block;
  padding: 0.05rem 0.38rem;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #0b1017;
  color: #d8fff9;
}

strong {
  color: var(--ink);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  margin-right: 0.38rem;
  padding: 0.05rem 0.45rem;
  border: 1px solid rgba(61, 214, 198, 0.45);
  border-radius: 999px;
  color: #bffdf6;
  background: rgba(61, 214, 198, 0.12);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  vertical-align: 0.08rem;
}

.tag.warn {
  border-color: rgba(246, 179, 109, 0.5);
  color: #ffd7aa;
  background: rgba(246, 179, 109, 0.13);
}

.tag.danger {
  border-color: rgba(255, 143, 143, 0.52);
  color: #ffc9c9;
  background: rgba(255, 143, 143, 0.12);
}

.tag.neutral {
  border-color: var(--line-strong);
  color: #d6e3f4;
  background: rgba(255, 255, 255, 0.055);
}

.marker {
  color: var(--brand);
  font-weight: 700;
}

.marker.warn {
  color: var(--accent);
}

.marker.danger {
  color: var(--danger);
}

pre {
  margin: 0.7rem 0 0;
  overflow-x: auto;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090d13;
  color: #dce7f5;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  padding: 1.4rem clamp(1rem, 4vw, 2.5rem) 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  line-height: 1.28;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.35rem, 2.3vw, 2.05rem);
}

h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.03rem;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 220px;
}

.header-meta span,
.header-meta a {
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  text-decoration: none;
}

.header-meta a:hover,
.header-meta a:focus-visible {
  color: var(--brand);
}

.manual-shell {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1rem;
  height: calc(100vh - 6.9rem);
  min-height: 620px;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
}

.manual-shell > input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.tab-list {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, 0.82);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.tab-list label {
  display: flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.tab-list label:hover,
.tab-list label:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

#tab-introduction:checked ~ .tab-list label[for="tab-introduction"],
#tab-overview:checked ~ .tab-list label[for="tab-overview"],
#tab-start:checked ~ .tab-list label[for="tab-start"],
#tab-sv:checked ~ .tab-list label[for="tab-sv"],
#tab-utility:checked ~ .tab-list label[for="tab-utility"],
#tab-bg:checked ~ .tab-list label[for="tab-bg"],
#tab-timing-property:checked ~ .tab-list label[for="tab-timing-property"],
#tab-settings:checked ~ .tab-list label[for="tab-settings"],
#tab-safety:checked ~ .tab-list label[for="tab-safety"],
#tab-trouble:checked ~ .tab-list label[for="tab-trouble"],
#tab-members:checked ~ .tab-list label[for="tab-members"] {
  border-color: rgba(61, 214, 198, 0.5);
  color: var(--ink);
  background: var(--brand-soft);
}

.tab-panel {
  display: none;
  min-width: 0;
  overflow-y: auto;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, 0.88);
  box-shadow: var(--shadow);
}

#tab-introduction:checked ~ #introduction-panel,
#tab-overview:checked ~ #overview-panel,
#tab-start:checked ~ #start-panel,
#tab-sv:checked ~ #sv-panel,
#tab-utility:checked ~ #utility-panel,
#tab-bg:checked ~ #bg-panel,
#tab-timing-property:checked ~ #timing-property-panel,
#tab-settings:checked ~ #settings-panel,
#tab-safety:checked ~ #safety-panel,
#tab-trouble:checked ~ #trouble-panel,
#tab-members:checked ~ #members-panel {
  display: block;
}

.introduction-panel {
  padding: 0;
  background: #101720;
}

.showcase-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  min-height: 430px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-image: var(--intro-hero-image);
  background-position: center 70%;
  background-size: 130% auto;
}

.showcase-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(5, 10, 15, 0.7);
}

.showcase-hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-width: 100%;
  min-width: 0;
  padding: 2.5rem;
}

.showcase-hero h2 {
  max-width: 700px;
  margin-bottom: 0.8rem;
  font-size: 3rem;
}

.showcase-hero-content > p:not(.eyebrow) {
  max-width: 650px;
  margin-bottom: 1.25rem;
  color: #d5dfec;
  font-size: 1rem;
  overflow-wrap: normal;
  white-space: nowrap;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.primary-action {
  border-color: var(--brand);
  color: #051414;
  background: var(--brand);
}

.secondary-action {
  background: rgba(8, 14, 21, 0.76);
}

.primary-action:hover,
.primary-action:focus-visible {
  color: #051414;
  background: #72e8dc;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.intro-meta span {
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  color: #c3cedc;
  background: rgba(8, 14, 21, 0.65);
  font-size: 0.8rem;
}

.intro-heading {
  max-width: 760px;
  padding: 3rem 2.5rem 2rem;
}

.intro-heading > p:last-child,
.intro-feature-copy p,
.intro-cta p {
  color: var(--muted);
}

.intro-feature {
  display: grid;
  grid-template-columns: minmax(16rem, 0.75fr) minmax(18rem, 1.25fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: 3rem 2.5rem;
  border-top: 1px solid var(--line);
}

.intro-feature.reverse .intro-feature-copy {
  order: 2;
}

.intro-feature.reverse .intro-screenshot {
  order: 1;
}

.intro-feature-copy {
  max-width: 560px;
}

.intro-feature-copy h3 {
  margin-bottom: 0.85rem;
  font-size: 1.7rem;
}

.feature-number {
  margin-bottom: 0.3rem;
  color: var(--accent) !important;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.text-action {
  display: inline-flex;
  margin-top: 0.4rem;
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

.text-action:hover,
.text-action:focus-visible {
  text-decoration: underline;
}

.intro-screenshot {
  justify-self: center;
  margin: 0;
}

.intro-screenshot img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
}

.portrait-shot {
  width: min(100%, 330px);
}

.compact-shot {
  width: min(100%, 420px);
}

.landscape-feature {
  grid-template-columns: minmax(16rem, 0.65fr) minmax(24rem, 1.35fr);
}

.landscape-shot {
  width: min(100%, 760px);
}

.intro-cta {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem;
  border-top: 1px solid rgba(61, 214, 198, 0.42);
  background: var(--brand-soft);
}

.intro-cta h3 {
  font-size: 1.35rem;
}

.intro-cta p {
  margin-bottom: 0;
}

.panel-header {
  width: 100%;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.panel-header p,
.block p,
.block li,
.dense-grid p,
.definition-list span,
.faq-list p {
  color: var(--muted);
}

.dense-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.dense-grid article,
.block,
.callout,
details,
.definition-list > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.dense-grid article,
.block,
.callout {
  padding: 1rem;
}

.content-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.start-columns {
  grid-template-columns: minmax(18rem, 0.72fr) minmax(0, 1.28fr);
}

.block,
.callout,
.definition-list,
.faq-list,
.content-columns,
.dense-grid {
  margin-bottom: 0.8rem;
}

.callout {
  border-color: rgba(61, 214, 198, 0.42);
  background: var(--brand-soft);
}

.warning {
  border-color: rgba(246, 179, 109, 0.45);
  background: var(--warning-bg);
}

.compact-steps {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding-left: 1.35rem;
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.9rem 0 0.5rem;
}

.formula-grid > div {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.formula-grid strong {
  color: var(--brand);
}

.small-note {
  font-size: 0.92rem;
}

.sv-graph-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 940px;
  margin-top: 0.85rem;
}

.sv-graph {
  max-width: 460px;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1017;
}

.sv-graph img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 130px;
}

.sv-graph figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.relative-graph-pair {
  max-width: 1120px;
}

.relative-graph {
  max-width: 560px;
}

.definition-list {
  display: grid;
  gap: 0.5rem;
}

.manual-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.manual-table > div {
  display: grid;
  grid-template-columns: minmax(9rem, 0.36fr) minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.manual-table > div:first-child {
  border-top: 0;
}

.manual-table > div > strong:first-child {
  color: var(--brand);
}

.manual-table > div > span strong {
  color: var(--ink);
}

.manual-table span {
  color: var(--muted);
}

.definition-list > div {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.35fr) minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.85rem 1rem;
}

.definition-list > div > strong:first-child {
  color: var(--brand);
}

.definition-list > div > span strong {
  color: var(--ink);
}

.definition-list a {
  color: #bffdf6;
  font-weight: 700;
  text-decoration: none;
}

.definition-list a:hover,
.definition-list a:focus-visible {
  color: var(--brand);
  text-decoration: underline;
}

.definition-list.tall > div {
  grid-template-columns: minmax(10rem, 0.32fr) minmax(0, 1fr);
}

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

.faq-list {
  display: grid;
  gap: 0.6rem;
}

.block a,
.faq-list a {
  color: #bffdf6;
  font-weight: 700;
  text-decoration: none;
}

.block a:hover,
.block a:focus-visible,
.faq-list a:hover,
.faq-list a:focus-visible {
  color: var(--brand);
  text-decoration: underline;
}

details {
  padding: 0.9rem 1rem;
}

summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

summary:hover,
summary:focus-visible {
  color: var(--brand);
}

@media (max-width: 1080px) {
  .manual-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .tab-list {
    display: flex;
    overflow-x: auto;
  }

  .tab-list label {
    flex: 0 0 auto;
  }

  .tab-panel {
    min-height: 62vh;
    max-height: none;
  }

  .dense-grid,
  .utility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-hero {
    min-height: 390px;
  }

  .intro-feature,
  .landscape-feature {
    grid-template-columns: minmax(14rem, 0.8fr) minmax(16rem, 1.2fr);
  }
}

@media (max-width: 720px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .app-header h1 {
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }

  .header-meta {
    justify-content: flex-start;
  }

  .content-columns,
  .dense-grid,
  .utility-grid,
  .formula-grid,
  .sv-graph-pair,
  .manual-table > div,
  .definition-list > div,
  .definition-list.tall > div {
    grid-template-columns: 1fr;
  }

  .manual-shell {
    width: 100%;
    min-width: 0;
    padding-inline: 0.75rem;
    overflow-x: hidden;
  }

  .tab-list {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
  }

  .tab-panel {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    overflow-x: hidden;
  }

  .showcase-hero {
    min-height: 460px;
    background-image: var(--intro-mobile-image);
    background-position: center 30%;
    background-size: cover;
  }

  .showcase-hero-content {
    width: 100%;
    max-width: none;
    padding: 1.4rem;
  }

  .showcase-hero-content > * {
    max-width: calc(100vw - 4.3rem);
  }

  .showcase-hero h2 {
    width: 100%;
    font-size: 1.85rem;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .showcase-hero-content > p:not(.eyebrow) {
    word-break: normal;
    white-space: normal;
  }

  .showcase-hero .intro-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    width: 100%;
  }

  .showcase-hero .primary-action,
  .showcase-hero .secondary-action {
    width: 100%;
  }

  .intro-heading,
  .intro-feature,
  .intro-cta {
    padding: 2rem 1.25rem;
  }

  .intro-feature,
  .landscape-feature {
    grid-template-columns: 1fr;
  }

  .intro-feature.reverse .intro-feature-copy,
  .intro-feature.reverse .intro-screenshot {
    order: initial;
  }

  .intro-feature-copy {
    max-width: none;
  }

  .intro-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
