/* SMOTP4SB Challenge, MVA2027
 *
 * Header: reproduces the conference site (solid #00695C, white type), so a
 * visitor arriving from mva-org.jp does not feel they have left it.
 * Below the header: the challenge's own identity. Its palette is taken from
 * the footage: clear November sky over a Japanese campus. Sky blue means
 * "observed" and amber means "the future", in the videos, the diagrams and
 * the type alike, so the legend is part of the design.
 */

:root {
  color-scheme: light;
  --mva:        #00695c;   /* official conference green */
  --mva-deep:   #004d43;
  --paper:      #f7f5f1;
  --paper-sunk: #efebe4;
  --card:       #ffffff;
  --rule:       #e2ddd4;
  --ink:        #1c1f26;
  --ink-soft:   #555c6a;
  --ink-faint:  #8b919c;
  --sky:        #2b6cb0;
  --sky-soft:   #e6eef8;
  --amber:      #b8691a;
  --amber-soft: #f8ecdb;
  --imu:        #00796b;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Hiragino Sans", "Noto Sans JP", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 40rem;
  --wide: 66rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #14171b; --paper-sunk: #0f1215; --card: #1b1f25; --rule: #2b313a;
    --ink: #e9e7e2; --ink-soft: #a7adb8; --ink-faint: #7a818c;
    --sky: #82b5e2; --sky-soft: #18242f; --amber: #e0a258; --amber-soft: #2a2013; --imu: #4db6ac;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #14171b; --paper-sunk: #0f1215; --card: #1b1f25; --rule: #2b313a;
  --ink: #e9e7e2; --ink-soft: #a7adb8; --ink-faint: #7a818c;
  --sky: #82b5e2; --sky-soft: #18242f; --amber: #e0a258; --amber-soft: #2a2013; --imu: #4db6ac;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sky); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
img, video { max-width: 100%; }

/* ---------------- official header ---------------- */
.site-header { background: var(--mva); color: #fff; position: relative; z-index: 60; }
.header-top, .header-nav { max-width: 66rem; margin: 0 auto; padding-inline: 1.5rem; }
.header-top { padding-block: 1.6rem 1.1rem; }
.logo { color: #fff; text-decoration: none; display: inline-flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.logo strong { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 1.55rem; font-weight: 700; }
.logo .tagline { font-size: 0.8rem; font-weight: 600; opacity: 0.92; }
.header-nav { display: flex; align-items: center; gap: 1rem; padding-block: 0 0.9rem; }
.menu { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1.5rem; margin: 0; padding: 0; font-size: 0.95rem; }
.menu > li { position: relative; }
.menu > li > a, .menu > li > span { color: #fff; text-decoration: none; display: block; padding-block: 0.25rem; cursor: pointer; }
.menu > li > a.active { border-bottom: 2px solid #fff; }
.menu > li > a:hover, .menu > li:hover > span { opacity: 0.85; }
.menu ul {
  display: none; position: absolute; top: 100%; left: -0.8rem; min-width: 12rem;
  background: #fff; border-radius: 4px; padding: 0.35rem 0; margin: 0.3rem 0 0;
  list-style: none; box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.menu li:hover > ul, .menu li:focus-within > ul { display: block; }
.menu ul a { display: block; padding: 0.35rem 1rem; color: #1e1e1e; text-decoration: none; white-space: nowrap; }
.menu ul a:hover { background: #eef5f4; }
.social { margin-left: auto; display: flex; gap: 0.9rem; }
.social a { color: #fff; display: inline-flex; }
.menu-toggle { display: none; }

/* ---------------- challenge sub-nav ---------------- */
.challenge-bar {
  background: var(--card); border-bottom: 1px solid var(--rule);
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
}
.challenge-bar .brand {
  display: block; max-width: var(--wide); margin: 0 auto; padding: 0.7rem 1.5rem 0.2rem;
  font-family: var(--display); font-weight: 600; font-size: 0.98rem; color: var(--ink); text-decoration: none;
}
.challenge-bar .sub {
  max-width: var(--wide); margin: 0 auto; padding-inline: 1.5rem;
  display: flex; gap: 1.3rem; font-size: 0.86rem; overflow-x: auto; scrollbar-width: none;
}
.challenge-bar .sub a { color: var(--ink-soft); text-decoration: none; padding-block: 0.4rem 0.6rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.challenge-bar .sub a:hover { color: var(--ink); }
.challenge-bar .sub a.here { color: var(--sky); border-bottom-color: var(--sky); }

/* ---------------- hero ---------------- */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; overflow: hidden; background: #2b4a6b; isolation: isolate; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,22,38,.10) 0%, rgba(10,22,38,.25) 45%, rgba(10,22,38,.72) 100%); }
.hero-text { align-self: end; max-width: var(--wide); width: 100%; margin: 0 auto; padding: 4rem 1.5rem 3.2rem; color: #fff; }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.9rem; opacity: 0.92; }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2.2rem, 5.6vw, 4rem); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 1rem; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero-sub { font-size: 1.12rem; max-width: 34rem; margin: 0 0 1.6rem; opacity: 0.95; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn { display: inline-block; padding: 0.7rem 1.2rem; border-radius: 6px; font-weight: 600; text-decoration: none; font-size: 0.98rem; }
.btn.primary { background: #fff; color: var(--mva-deep); }
.btn.primary:hover { background: #eaf4f2; }
.btn.ghost { color: #fff; border: 1.5px solid rgba(255,255,255,.75); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.hero-credit { position: absolute; right: 1rem; bottom: 0.6rem; margin: 0; font-size: 0.72rem; color: rgba(255,255,255,.75); }

/* ---------------- content ---------------- */
main { max-width: var(--wide); margin: 0 auto; padding: 3rem 1.5rem 5rem; display: flex; flex-direction: column; align-items: start; }
main > * { max-width: var(--measure); width: 100%; }
main > .track-grid, main > figure.wide, main > .people-wrap, main > .dates-strip, main > .news { max-width: var(--wide); }

h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
main h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 1.4rem; }
h2 { font-size: 1.6rem; font-weight: 600; line-height: 1.2; margin: 2.8rem 0 1rem; }
h3 { font-size: 1.12rem; font-weight: 600; margin: 2rem 0 0.6rem; }
p { margin: 0 0 1.15rem; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.6rem 0; width: 100%; max-width: var(--wide); }
hr + h2 { margin-top: 1.4rem; }
ul, ol { margin: 0 0 1.3rem; padding-left: 1.25rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--sky); }
del { color: var(--ink-faint); }
code { font-family: var(--mono); font-size: 0.85em; background: var(--paper-sunk); border-radius: 3px; padding: 0.12em 0.34em; }
pre { background: var(--paper-sunk); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.1rem; overflow-x: auto; margin: 0 0 1.5rem; }
pre code { background: none; padding: 0; font-size: 0.8rem; line-height: 1.6; }
blockquote { margin: 0 0 1.5rem; padding: 1rem 1.2rem; background: var(--amber-soft); border-left: 3px solid var(--amber); border-radius: 0 4px 4px 0; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.6rem; font-size: 0.93rem; }
/* A table wider than a phone scrolls inside its own box, not the page. */
.table-scroll { overflow-x: auto; margin: 0 0 1.6rem; }
.table-scroll table { margin: 0; }
thead th { text-align: left; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); padding: 0 0.7rem 0.45rem; border-bottom: 1px solid var(--ink-faint); }
tbody td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:not(:first-child) { font-variant-numeric: tabular-nums; }

/* ---------------- figures & video ---------------- */
figure.wide { margin: 2rem 0 2.4rem; }
figure.wide img, figure.wide video { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--rule); background: #000; }
figcaption { margin-top: 0.7rem; font-size: 0.88rem; color: var(--ink-soft); max-width: var(--measure); }
.sky { color: var(--sky); font-weight: 600; }
.amber { color: var(--amber); font-weight: 600; }

/* ---------------- news ---------------- */
.news { margin: 0 0 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.3rem 0.6rem; }
.news-h { font-size: 0.78rem; font-family: var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--mva); margin: 0 0 0.5rem; }
.news ul { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.45rem 0; border-top: 1px solid var(--rule); margin: 0; }
.news li:first-child { border-top: 0; }
.news time { color: var(--ink-faint); font-size: 0.86rem; font-variant-numeric: tabular-nums; }

/* ---------------- tracks ---------------- */
.track-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.4rem; margin: 0.6rem 0 1.6rem; }
.track-card { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.track-card video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #2b4a6b; }
.track-body { padding: 1.1rem 1.3rem 1.2rem; }
.track-body h3 { margin: 0.1rem 0 0.5rem; font-size: 1.3rem; }
.track-body p { margin: 0 0 0.7rem; }
.track-tag { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0; }
.metric { font-size: 0.92rem; color: var(--ink-soft); margin: 0 !important; }

/* ---------------- dates strip ---------------- */
.dates-strip { list-style: none; padding: 0; margin: 0.4rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0; border-top: 2px solid var(--mva); }
.dates-strip li { margin: 0; padding: 0.8rem 0.7rem 0.6rem 0; border-right: 1px solid var(--rule); }
.dates-strip li:last-child { border-right: 0; }
/* Full month names, as on the MVA2027 site; one line, so every date sits at the same height. */
.dates-strip time { display: block; font-family: var(--display); font-weight: 600; font-size: 0.98rem; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.dates-strip span { font-size: 0.84rem; color: var(--ink-soft); }

/* ---------------- people ---------------- */
/* Groups take their natural width so two chairs sit side by side. */
.people-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 3.2rem; }
.people-group h3 { font-family: var(--body); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mva); margin: 1.4rem 0 0.8rem; }
.people { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.4rem; }
.person { margin: 0; width: 11rem; text-align: center; }
.plink { color: var(--sky); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--sky) 45%, transparent);
  border-radius: 3px; padding: 0 0.15rem; transition: background .15s ease, text-decoration-color .15s ease; }
.plink:hover, .plink:focus-visible { background: var(--sky-soft); text-decoration-color: var(--sky); }
.plink-arrow { display: inline-block; white-space: nowrap; font-size: 0.8em; margin-left: 0.2em; transition: transform .15s ease; }
.plink:hover .plink-arrow { transform: translate(1px, -1px); }
.person img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 0.6rem; box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--rule); }
.pname { font-weight: 600; margin: 0 0 0.15rem; line-height: 1.3; }
.paff { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.35; margin: 0; }


/* ---------------- diagrams ---------------- */
.diagram { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 1.2rem 1.2rem 0.9rem; }
.diagram-scroll { overflow-x: auto; }
.diagram svg { width: 100%; min-width: 30rem; height: auto; display: block; }
.diagram .g { stroke: var(--rule); stroke-width: 1; }
.diagram .ax { stroke: var(--ink-faint); stroke-width: 1; }
.diagram .t { fill: var(--ink-soft); font: 12px var(--body); }
.diagram .lb { fill: var(--ink); font-weight: 600; }
.diagram .mk { fill: var(--ink-faint); font-style: italic; }
.diagram .mark { stroke: var(--ink-faint); stroke-dasharray: 4 4; }
.diagram .c-iou { fill: none; stroke: var(--ink-faint); stroke-width: 2.5; }
.diagram .c-dotd { fill: none; stroke: var(--sky); stroke-width: 3; }
.diagram .lab { font: 600 13px var(--body); }
.diagram .lab.iou { fill: var(--ink-soft); }
.diagram .lab.dotd { fill: var(--sky); }
.diagram .sq-gt { fill: var(--ink-soft); }
.diagram .sq-tp { fill: var(--sky); }
.diagram .sq-fp { fill: var(--amber); }
.diagram .sq-none { fill: var(--paper-sunk); stroke: var(--rule); }
.diagram .dot { fill: var(--ink); }
.diagram .cam { fill: none; stroke: var(--ink); stroke-width: 2; }
.diagram .v-bird { stroke: var(--amber); stroke-width: 3; }
.diagram .v-cam { stroke: var(--ink-faint); stroke-width: 3; stroke-dasharray: 6 4; }
.diagram .v-obs { stroke: var(--sky); stroke-width: 3; }
.diagram .ahead { fill: var(--ink-soft); }
.diagram .op { fill: var(--ink-faint); font: 600 28px var(--body); }
.key { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 2px; vertical-align: -0.05em; margin: 0 0.25em 0 0.6em; }
.key.sq-tp { background: var(--sky); } .key.sq-fp { background: var(--amber); }
.key.sq-none { background: var(--paper-sunk); border: 1px solid var(--rule); }

/* ---------------- footer ---------------- */
footer { border-top: 1px solid var(--rule); background: var(--paper-sunk); padding: 2.2rem 1.5rem 3rem; color: var(--ink-soft); font-size: 0.86rem; }
footer p { max-width: var(--wide); margin: 0 auto 0.4rem; }

/* ---------------- narrow ---------------- */
/* The MVA header switches to the menu button at the same width as the official
   site's (960px), so moving between the two does not change the header. */
@media (max-width: 960px) {
  /* one row, as on the official site: MVA2027 over its subtitle on the left,
     the menu button and icons on the right */
  .site-header { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 1rem; }
  .header-top, .header-nav { margin: 0; padding: 0; }
  .header-top { flex: 1; min-width: 0; }
  .logo { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .logo strong { font-size: 1.25rem; line-height: 1.2; }
  .logo .tagline { font-size: 0.7rem; line-height: 1.3; }
  .menu-toggle { display: block; background: none; border: 0; padding: 0.3rem; cursor: pointer; }
  .menu-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--mva); padding: 0.4rem 1.5rem 1rem; }
  .menu.open { display: flex; }
  .menu ul { display: block; position: static; background: none; box-shadow: none; padding: 0 0 0.3rem 1rem; margin: 0; }
  .menu ul a { color: rgba(255,255,255,.85); padding: 0.25rem 0; }
  .menu ul a:hover { background: none; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { min-height: 30rem; }
  .hero-text { padding: 3rem 1.2rem 2.4rem; }
  .news li { grid-template-columns: 1fr; gap: 0.1rem; }
  main { padding: 2.2rem 1.2rem 4rem; }
  .dates-strip li { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* Reduced motion: the script below pauses every video on its poster frame,
   rather than hiding it and leaving the cards empty. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------------- series lineage ---------------- */
main > .lineage { max-width: var(--wide); }
.lineage { list-style: none; padding: 0; margin: 0.8rem 0 1.8rem; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 1.2rem; counter-reset: none; }
.lin-card { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1rem 1.2rem 1.1rem; display: flex; flex-direction: column; position: relative; }
/* Arrow between cards reads the series as a progression, left to right. */
.lin-card + .lin-card::before { content: "→"; position: absolute; left: -1.05rem; top: 4.6rem;
  font: 600 1.1rem var(--body); color: var(--ink-faint); }
.lin-card.current { border: 2px solid var(--mva); box-shadow: 0 6px 22px rgba(0,105,92,.10); }
.lin-year { margin: 0 0 0.4rem; font: 600 0.74rem var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.current .lin-year { color: var(--mva); }
.lin-art { background: var(--sky-soft); border-radius: 6px; padding: 0.5rem; margin-bottom: 0.8rem; }
.lin-art svg { width: 100%; height: auto; display: block; }
.lin-art .frm { fill: #fff; stroke: #9db4cc; stroke-width: 1.2; }
.lin-art .frm.back { fill: #f3f7fb; }
.lin-art .bx { fill: none; stroke: #2b6cb0; stroke-width: 1.4; }
.lin-art .bd { fill: #1c1f26; }
.lin-art .pt { fill: #fff; stroke: #1c1f26; stroke-width: 1.4; }
.lin-art .trail { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.lin-art .t1 { stroke: #c2185b; } .lin-art .t2 { stroke: #2e7d32; }
.lin-art .obs { stroke: #2b6cb0; } .lin-art .fut { stroke: #b8691a; stroke-dasharray: 5 3; }
.lin-art .mode { stroke: #9aa3ad; stroke-width: 1.2; fill: none; }
.lin-art .drone { fill: #1c1f26; } .lin-art .rotor { stroke: #1c1f26; stroke-width: 1.6; }
.lin-art .imu { fill: #fff; font: 700 6px var(--body); }
.lin-card h3 { margin: 0 0 0.5rem; font-size: 1.02rem; line-height: 1.25; }
.lin-short { display: block; font-size: 1.3rem; }
.lin-points { padding-left: 1.1rem; margin: 0 0 0.9rem; font-size: 0.9rem; flex: 1; }
.lin-points li { margin-bottom: 0.25rem; }
.lin-points li.new { color: var(--mva); font-weight: 600; }
.lin-link { font-size: 0.9rem; font-weight: 600; }
.here-badge { color: var(--mva); }

/* ---------------- contact & share ---------------- */
.placeholder { background: var(--amber-soft); border: 1px dashed var(--amber); border-radius: 4px; padding: 0.6rem 0.9rem; color: var(--amber); font-weight: 600; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.5rem; }
.share p { margin: 0 0.4rem 0 0; font-weight: 600; }
.btn-share { display: inline-block; padding: 0.45rem 0.9rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.btn-share:hover { border-color: var(--sky); color: var(--sky); }
@media (max-width: 860px) { .lin-card + .lin-card::before { content: "↓"; left: 50%; top: -1.15rem; transform: translateX(-50%); } }


/* ---------------- concept figure ----------------
   Order: the two tracks side by side, the shared input (video and IMU on one
   time axis), then each track full width. Track 1 is sky, Track 2 is amber,
   everywhere on the page, so the colour alone tells a reader which is which. */
main > .concept { max-width: var(--wide); }
.concept { margin: 0.6rem 0 1.6rem; display: flex; flex-direction: column; }

.tk-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tk { display: flex; gap: 1rem; align-items: flex-start; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-top: 6px solid var(--tc);
  border-radius: 10px; padding: 1.1rem 1.2rem 1.2rem; transition: transform .15s ease, box-shadow .15s ease; }
.tk:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(28,31,38,.08); }
.tk1, .p1 { --tc: var(--sky); --tc-soft: var(--sky-soft); }
.tk2, .p2 { --tc: var(--amber); --tc-soft: var(--amber-soft); }
.tk-n { flex: none; font: 600 3.6rem/0.9 var(--display); color: var(--tc); }
.tk-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.tk-k { font: 700 0.78rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--tc); }
.tk-new { display: inline-block; font: 700 0.66rem var(--body); letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--amber); color: var(--card); border-radius: 3px; padding: 0.08rem 0.35rem; vertical-align: 0.12em; margin-left: 0.3rem; }
.tk-name { font: 600 1.35rem/1.2 var(--display); }
.tk-q { color: var(--ink-soft); font-size: 1rem; }
.tk-io { margin-top: 0.45rem; font-size: 0.93rem; line-height: 1.5; }
.tk-io b { font: 700 0.7rem var(--body); letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--tc-soft); color: var(--tc); border-radius: 3px; padding: 0.06rem 0.32rem; margin-right: 0.25rem; }
.tk-io b + b, .tk-io b:not(:first-child) { margin-left: 0.5rem; }
.tk-m { margin-top: 0.35rem; font-size: 0.86rem; color: var(--ink-faint); }
.tk-note { margin: 0.7rem 0 1.4rem; text-align: center; font-size: 0.95rem; color: var(--ink-soft); }

.cp-input { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.2rem 1.1rem; }
.cp-input > .cp-k { margin-bottom: 0.7rem; }
.in-grid { display: grid; grid-template-columns: 11rem 1fr; column-gap: 1rem; row-gap: 0.45rem; align-items: center; }
.in-lab { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.35rem; font-size: 0.84rem; line-height: 1.3; color: var(--ink-soft); }
.in-lab b { font: 700 1rem var(--body); color: var(--ink); }
.in-lab span:last-child { flex-basis: 100%; }
.in-lab .tk-new { margin-left: 0; }
.in-strip { width: 100%; height: auto; display: block; border-radius: 4px; }
.imu-band { width: 100%; height: 3.2rem; display: block; background: var(--paper-sunk); border-radius: 4px; overflow: visible; }
.imu-line { fill: none; stroke: var(--imu); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.imu-zero { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 4; }
.in-axis { margin: 0; display: flex; justify-content: space-between; font: 0.78rem var(--mono); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cp-input .cp-d { margin: 0.8rem 0 0; }

.cp-down { width: 2px; height: 1.8rem; background: var(--ink-faint); margin: 0 auto; position: relative; }
.cp-down::after { content: ""; position: absolute; left: -5px; bottom: -2px;
  border: 6px solid transparent; border-top: 8px solid var(--ink-faint); border-bottom: 0; }

.cp-panel { background: var(--card); border: 1px solid var(--rule); border-top: 6px solid var(--tc);
  border-radius: 12px; overflow: hidden; margin-bottom: 1.4rem; scroll-margin-top: 6rem; }
.cp-head { padding: 1rem 1.3rem 0.9rem; display: flex; gap: 1rem; align-items: center; }
.cp-head .tk-n { font-size: 3.2rem; }
.cp-head .cp-k { color: var(--tc); }
.cp-panel video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #2b4a6b; }
.cp-k { margin: 0; font: 700 0.76rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.cp-q { margin: 0.15rem 0 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.cp-d { margin: 0; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; }
.cp-legend { list-style: none; margin: 0; padding: 0.9rem 1.3rem 1.1rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; font-size: 0.95rem; }
.cp-legend li { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.cp-legend li.note { display: block; flex-basis: 100%; color: var(--ink-soft); }
.lg-box { width: 1.1rem; height: 0.85rem; border: 2.5px solid #d6298a; border-radius: 2px; }
.lg-id { font: 700 0.72rem var(--body); background: #57d17a; color: #111; padding: 0.05rem 0.3rem; border-radius: 2px; }
.lg-line { width: 2rem; height: 0; border-top: 4px solid; border-radius: 2px; }
.lg-line.obs { border-color: #79b7e6; }
.lg-line.mode { border-color: #c9ccd1; }
.lg-line.fut { border-color: #f0962e; }

/* hero: each line of the headline is one track */
.hero h1 { display: flex; flex-direction: column; gap: 0.25em; }
.h1-row { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.hn { flex: none; font: 700 0.9rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: #fff; border-radius: 4px; padding: 0.5rem 0.65rem; text-shadow: none; }
.hn1 { background: #2b6cb0; }
.hn2 { background: #b8691a; }
.hn:hover { filter: brightness(1.12); }

@media (max-width: 860px) {
  .tk-pair { grid-template-columns: 1fr; }
  .in-grid { grid-template-columns: 1fr; row-gap: 0.3rem; }
  .in-grid > span:empty { display: none; }
  .in-lab { margin-top: 0.4rem; }
  .cp-legend { font-size: 0.88rem; }
  .tk-n { font-size: 2.8rem; }
  .hn { font-size: 0.72rem; padding: 0.4rem 0.5rem; }
}
