/* ============================================================
   hakkeyoi.net — the state of professional sumo, one page.
   Editorial "banzuke on washi" aesthetic: sumi ink on paper,
   vermilion seal-red accent, mincho display type.
   ============================================================ */

:root {
  --paper:     #f4f0e6;
  --paper-2:   #ebe3d0;
  --paper-3:   #e3d9be;
  --ink:       #18150f;
  --ink-2:     #211d15;   /* dark panel */
  --ink-3:     #2c2719;
  --ink-soft:  #5b5446;
  --red:       #b23120;
  --red-deep:  #8c2417;
  --gold:      #a4854a;
  --line:      #cabf9d;
  --line-soft: #ddd3b5;
  --ok:        #4d7a3e;
  --live:      #e0533a;
  --shadow:    0 1px 0 rgba(0,0,0,.04);
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --sans:  "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono:  "Space Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;          /* belt: keep stray-wide children from causing horizontal scroll */
}
/* Suspenders for flex/grid items that would otherwise refuse to shrink
   below their intrinsic content size (the default `min-width: auto`). */
.tile, .lead-row > *, .board-head > *, .r-bio > div { min-width: 0; }

img { max-width: 100%; display: block; }
a { color: var(--red-deep); }

/* paper texture — faint diagonal weave */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, rgba(120,100,60,.025) 0 2px, transparent 2px 7px);
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }

/* ---------- typography helpers ---------- */
.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }
.kicker {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--red-deep); font-weight: 700;
}
.jp { font-family: var(--serif); }

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  border-bottom: 3px double var(--ink);
  padding: 22px 0 16px;
}
.masthead .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.seal {
  width: 46px; height: 46px; flex: none;
  background: var(--red); color: var(--paper);
  font-family: var(--serif); font-weight: 800; font-size: 26px;
  display: grid; place-items: center;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.wordmark {
  font-family: var(--serif); font-weight: 800;
  font-size: 30px; letter-spacing: .03em; line-height: 1;
}
.wordmark span { color: var(--red); }
.tagline {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); margin-top: 5px;
}
nav.top { display: flex; gap: 22px; align-items: baseline; }
nav.top a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
  padding-bottom: 3px; border-bottom: 2px solid transparent;
}
nav.top a:hover { border-color: var(--red); }
nav.top a.active { border-color: var(--ink); }

/* ============================================================
   ATF DASHBOARD — dark "status board"
   ============================================================ */
.board {
  background: var(--ink-2);
  color: var(--paper);
  padding: 40px 0 46px;
  border-bottom: 3px double var(--ink);
}
.board::after { /* hairline glow */
  content:""; display:block;
}
.board-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px; flex-wrap: wrap; margin-bottom: 26px;
}
.board-head h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(28px, 4.4vw, 46px); line-height: 1.05;
  letter-spacing: .01em;
}
.board-head h1 em { color: #e7b86b; font-style: normal; }
.asof {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  color: #b8ad92; text-align: right; line-height: 1.7;
}
.asof b { color: var(--paper); }

/* tile grid */
.tiles {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.tile {
  background: var(--ink-3);
  border: 1px solid #3c3424;
  border-radius: 7px;
  padding: 16px 17px 15px;
  position: relative;
  display: flex; flex-direction: column; min-height: 116px;
}
.tile .t-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .15em;
  text-transform: uppercase; color: #9d9377;
}
.tile .t-big {
  font-family: var(--serif); font-weight: 800;
  font-size: 25px; line-height: 1.12; margin-top: auto; color: var(--paper);
}
.tile .t-sub {
  font-family: var(--mono); font-size: 11.5px; color: #c4b994; margin-top: 5px;
}
.tile.span6 { grid-column: span 6; }
.tile.span4 { grid-column: span 4; }
.tile.span3 { grid-column: span 3; }
.tile.span5 { grid-column: span 5; }
.tile.span7 { grid-column: span 7; }
.tile.span12 { grid-column: span 12; }

.tile.live { border-color: var(--live); }
.tile.alert { border-color: #b5563a; }
.tile.live .t-big em, .tile.alert .t-big em { font-style: normal; }

/* live dot */
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--live); margin-right: 7px; vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(224,83,58,.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224,83,58,.65); }
  70%  { box-shadow: 0 0 0 9px rgba(224,83,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,83,58,0); }
}
.flag-out {
  display:inline-block; font-family:var(--mono); font-size:10px;
  letter-spacing:.1em; background:#b5563a; color:#fff;
  padding:1px 6px; border-radius:3px; vertical-align:middle;
}

/* season progress pips */
.season-pips { display:flex; gap:6px; margin-top:auto; }
.pip {
  flex:1; height:9px; border-radius:2px; background:#473f2c;
  position:relative;
}
.pip.done { background:#7c8a4e; }
.pip.live { background:var(--live); }
.pip-row { display:flex; gap:6px; margin-top:7px; }
.pip-row span {
  flex:1; text-align:center; font-family:var(--mono);
  font-size:9px; color:#9d9377; letter-spacing:.04em;
}

/* mini leaderboard inside tile */
.lead-list { margin-top: 10px; }
.lead-row {
  display:flex; justify-content:space-between; align-items:baseline;
  font-family:var(--mono); font-size:12.5px;
  padding:4px 0; border-bottom:1px dotted #443d2b;
}
.lead-row:last-child { border-bottom:0; }
.lead-row .nm { color:var(--paper); font-family:var(--sans); font-weight:600; }
.lead-row .nm small { color:#9d9377; font-weight:400; font-size:10.5px; }
.lead-row .rec { color:#e7b86b; font-weight:700; }
.lead-row.leader .rec { color:#fff; }

/* ============================================================
   SECTIONS (light editorial)
   ============================================================ */
section { padding: 50px 0; border-bottom: 1px solid var(--line-soft); }
section:last-of-type { border-bottom: 0; }

.sec-head { margin-bottom: 26px; }
.sec-head h2 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(24px, 3.4vw, 33px); line-height: 1.12;
  margin-top: 6px;
}
.sec-head p.intro {
  margin-top: 9px; color: var(--ink-soft); max-width: 62ch; font-size: 16px;
}

/* ---------- 2026 timeline ---------- */
.timeline {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 0; border: 1px solid var(--line);
  background: var(--paper-2);
}
.bcell {
  padding: 16px 14px 15px; border-right: 1px solid var(--line);
  position: relative; min-height: 158px;
  display: flex; flex-direction: column;
}
.bcell:last-child { border-right: 0; }
.bcell .b-month {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--ink-soft); text-transform: uppercase;
}
.bcell .b-name {
  font-family: var(--serif); font-weight: 800; font-size: 19px;
  margin: 3px 0 2px;
}
.bcell .b-venue { font-size: 12.5px; color: var(--ink-soft); }
.bcell .b-winner {
  margin-top: auto; padding-top: 10px; font-size: 13.5px;
}
.bcell .b-winner b { font-family: var(--serif); }
.bcell .b-tag {
  position: absolute; top: 14px; right: 12px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing:.08em;
  padding: 2px 6px; border-radius: 3px;
}
.b-tag.done { background: var(--ok); color: #fff; }
.b-tag.live { background: var(--live); color: #fff; }
.b-tag.next { background: var(--ink); color: var(--paper); }
.b-tag.soon { background: var(--paper-3); color: var(--ink-soft); }
.bcell.is-live { background: #f6e9dd; }

/* ---------- generic prose cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(232px,1fr));
  gap: 16px;
}
.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 19px 19px 17px;
}
.card h3 {
  font-family: var(--serif); font-weight: 800; font-size: 18px;
  line-height: 1.2; margin-bottom: 7px;
}
.card .c-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--red-deep); display: block;
  margin-bottom: 9px;
}
.card p { font-size: 14.5px; color: var(--ink-soft); }
.card p + p { margin-top: 8px; }

/* ---------- data table ---------- */
.tbl-wrap { border:1px solid var(--line); border-radius:6px; overflow:hidden; overflow-x:auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; background: var(--paper-2); }
table.data th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; text-align: left; color: var(--ink-soft);
  padding: 10px 14px; background: var(--paper-3);
  border-bottom: 1px solid var(--line);
}
table.data td {
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px; vertical-align: top;
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.rec { font-family: var(--mono); font-weight: 700; }
table.data .nm { font-family: var(--serif); font-weight: 800; font-size: 15.5px; }
table.data tr.hl { background: #f6e9dd; }

/* ---------- ranking ladder ---------- */
.ladder { display: flex; flex-direction: column; gap: 8px; }
.rung {
  display: grid; grid-template-columns: 168px 1fr; gap: 18px;
  align-items: center;
  border-left: 5px solid var(--red);
  background: var(--paper-2); border-radius: 0 6px 6px 0;
  padding: 13px 18px;
}
.rung.r2 { border-color: #c06a2c; }
.rung.r3 { border-color: var(--gold); }
.rung.r4 { border-color: #8a8a55; }
.rung .r-rank {
  font-family: var(--serif); font-weight: 800; font-size: 19px;
}
.rung .r-rank small {
  display:block; font-family: var(--mono); font-weight:400;
  font-size: 10.5px; letter-spacing:.08em; color: var(--ink-soft);
  text-transform: uppercase; margin-top: 2px;
}
.rung .r-people { font-size: 14.5px; }
.rung .r-people b { font-family: var(--serif); font-size: 15.5px; }
.rung .r-people .who { display:inline-block; margin-right: 4px; }

/* ---------- storyline list ---------- */
.stories { display: flex; flex-direction: column; gap: 2px; }
.story {
  display: grid; grid-template-columns: 54px 1fr; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line-soft);
}
.story:last-child { border-bottom: 0; }
.story .s-num {
  font-family: var(--serif); font-weight: 800; font-size: 30px;
  color: var(--line); line-height: 1;
}
.story h3 {
  font-family: var(--serif); font-weight: 800; font-size: 20px;
  line-height: 1.18; margin-bottom: 6px;
}
.story h3 .s-key {
  font-family: var(--mono); font-size: 10px; letter-spacing:.12em;
  text-transform: uppercase; color: var(--red-deep);
  border:1px solid var(--line); border-radius: 3px;
  padding: 2px 6px; margin-left: 8px; vertical-align: 3px;
  white-space: nowrap;
}
.story p { font-size: 15px; color: var(--ink-soft); }

/* ---------- video panel ---------- */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;          /* 16:9 */
  height: 0;
  background: var(--ink-2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px; flex-wrap: wrap; margin-top: 12px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  color: var(--ink-soft);
}
.video-meta a { color: var(--red-deep); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- pull / definition ---------- */
.deflist { display:grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 2px 30px; }
.def {
  padding: 13px 0; border-bottom: 1px solid var(--line-soft);
}
.def dt {
  font-family: var(--serif); font-weight: 800; font-size: 16px;
}
.def dt .say {
  font-family: var(--mono); font-size: 11px; color: var(--red-deep);
  font-weight: 400; margin-left: 7px;
}
.def dd { font-size: 14px; color: var(--ink-soft); margin-top: 3px; }

/* ---------- callout ---------- */
.callout {
  background: var(--ink-2); color: var(--paper);
  border-radius: 8px; padding: 24px 26px;
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
}
.callout .co-k {
  font-family: var(--serif); font-weight: 800; font-size: 21px;
  flex: 1; min-width: 240px;
}
.callout .co-k em { color: #e7b86b; font-style: normal; }
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none;
  background: var(--red); color: #fff; padding: 12px 20px;
  border-radius: 5px; white-space: nowrap; font-weight: 700;
}
.btn:hover { background: var(--red-deep); }
.btn.ghost { background: transparent; color: var(--paper); border:1px solid #5a5238; }
.btn.ghost:hover { background:#2c2719; }

/* ---------- prose (supporting pages) ---------- */
.prose h2 {
  font-family: var(--serif); font-weight: 800; font-size: 27px;
  margin: 38px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--ink);
}
.prose h3 {
  font-family: var(--serif); font-weight: 800; font-size: 20px;
  margin: 26px 0 8px;
}
.prose p { margin: 12px 0; }
.prose ul { margin: 12px 0 12px 22px; }
.prose li { margin: 6px 0; }
.prose .lede {
  font-size: 19px; font-family: var(--serif); color: var(--ink);
  line-height: 1.5; margin: 14px 0 24px;
}
blockquote {
  border-left: 4px solid var(--red); background: var(--paper-2);
  padding: 14px 20px; margin: 18px 0; border-radius: 0 6px 6px 0;
  font-size: 15px;
}
blockquote .eli5 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing:.13em;
  text-transform: uppercase; color: var(--red-deep); display:block;
  margin-bottom: 6px;
}

/* ---------- footer ---------- */
footer {
  background: var(--ink-2); color: #b8ad92;
  padding: 40px 0 46px; font-size: 13.5px;
}
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
footer h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--paper); margin-bottom: 10px;
}
footer a { color: #d8cfb4; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer .fbrand {
  font-family: var(--serif); font-weight: 800; font-size: 22px; color: var(--paper);
}
footer .fbrand span { color: var(--red); }
footer ul { list-style: none; }
footer li { margin: 4px 0; }
footer .legal {
  grid-column: 1/-1; border-top: 1px solid #3c3424; padding-top: 18px;
  margin-top: 6px; font-family: var(--mono); font-size: 11px;
  color: #8a8068; line-height: 1.8;
}

/* ---------- misc ---------- */
.prov {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  background: var(--paper-3); border:1px solid var(--line);
  border-radius: 4px; padding: 3px 8px; display: inline-block;
}
.note-sm { font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); margin-top: 12px; }
.anchor { scroll-margin-top: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .tile.span6,.tile.span4,.tile.span3,.tile.span5,.tile.span7 { grid-column: span 6; }
  .timeline { grid-template-columns: repeat(2,1fr); }
  .bcell:nth-child(2n) { border-right: 0; }
  .bcell { border-bottom: 1px solid var(--line); }
  footer .wrap { grid-template-columns: 1fr 1fr; }
}
/* The nav has eight items now (Now, 2026 Season, Rikishi, Heya, Kimarite,
   Yusho, Learn Sumo, About). At narrow widths let it overflow horizontally
   instead of wrapping into a cluttered grid. Items keep one line and the
   user swipes the strip sideways. */
@media (max-width: 760px) {
  .masthead .wrap { gap: 14px; align-items: center; }
  nav.top {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 18px;
    padding: 4px 0 2px;
    margin: 2px -4px 0;
    border-top: 1px solid var(--line-soft);
  }
  nav.top::-webkit-scrollbar { display: none; }
  nav.top a { flex: 0 0 auto; font-size: 11.5px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding: 0 18px; }
  .tile.span6,.tile.span4,.tile.span3,.tile.span5,.tile.span7 { grid-column: span 12; }
  .timeline { grid-template-columns: 1fr; }
  .bcell { border-right: 0; }
  .rung { grid-template-columns: 1fr; gap: 6px; }
  .story { grid-template-columns: 1fr; gap: 4px; }
  .story .s-num { font-size: 22px; }
  footer .wrap { grid-template-columns: 1fr; }
  /* Tight table cells + horizontal scroll on small screens. */
  table.data th, table.data td { padding: 8px 10px; font-size: 13.5px; }
  table.data .nm { font-size: 14px; }
  /* The leaderboard lead-row uses flex to push the record value far right.
     At very narrow widths the right-aligned text gets clipped against the
     tile edge; stack vertically instead. */
  .lead-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .lead-row .rec { align-self: flex-end; }
  /* Champions list inside the span-12 tile reads better as a 2-col grid */
  #champ-list .lead-row {
    display: grid; grid-template-columns: 1fr auto;
    align-items: center; gap: 12px;
  }
  /* The 6-pip season row needs to stay one line — shrink the labels */
  .pip-row span { font-size: 8.5px; }
}
