/* ============================================================
   sbor/ka — UI KIT  ·  canonical component library
   ------------------------------------------------------------
   The single source of truth for sbor/ka components. Both the
   website and the /ui-kit gallery consume these classes.

   Depends on css/colors_and_type.css (tokens) being loaded first.
   Components are driven by React wrappers in src/ui-kit.jsx
   (window.UI.*) — edit styles here, markup there.

   Rules of the system: rectangles, zero radius (circles 50%),
   no shadows, flat saturated color, tight Suisse type, hairline
   1px ink gaps instead of borders.
   ============================================================ */

/* ============================================================
   01 — ACTIONS · buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 28px;
  font-family: var(--sb-font-display); font-size: 22px; line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em; text-transform: lowercase;
  cursor: pointer; text-decoration: none; border: 0; border-radius: 0;
  background: var(--sb-ink); color: var(--sb-bone);
  transition: background 120ms cubic-bezier(0.2,0,0,1), color 120ms cubic-bezier(0.2,0,0,1);
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.btn:hover { background: var(--sb-red); color: var(--sb-bone); }
.btn .arr, .btn .arrow { font-family: var(--sb-font-display); }

.btn.red, .btn.orange { background: var(--sb-red); color: var(--sb-bone); }
.btn.red:hover, .btn.orange:hover { background: var(--sb-ink); }
.btn.yellow { background: var(--sb-yellow); color: var(--sb-ink); }
.btn.yellow:hover { background: var(--sb-ink); color: var(--sb-bone); }
.btn.coral  { background: var(--sb-coral); color: var(--sb-ink); }
.btn.coral:hover { background: var(--sb-red); color: var(--sb-bone); }
.btn.bone   { background: var(--sb-bone); color: var(--sb-ink); }
.btn.bone:hover { background: var(--sb-red); color: var(--sb-bone); }
.btn.outline { background: transparent; color: var(--sb-ink); border: 1px solid var(--sb-ink); padding: 17px 27px; }
.btn.outline:hover { background: var(--sb-ink); color: var(--sb-bone); }
.btn.ghost { background: transparent; color: var(--sb-ink); padding-left: 0; padding-right: 0; }
.btn.ghost:hover { color: var(--sb-red); }
.btn.ghost-light { background: rgba(248,246,241,0.10); color: var(--sb-bone); }
.btn.ghost-light:hover { background: var(--sb-bone); color: var(--sb-ink); }
.btn.yellow-cta { background: var(--sb-yellow); color: var(--sb-ink); }
.btn.yellow-cta:hover { background: var(--sb-red); color: var(--sb-bone); }
.btn.disabled { background: var(--sb-bone); color: var(--sb-ink); opacity: 0.35; cursor: not-allowed; pointer-events: none; }

.btn.sm { padding: 10px 16px; font-size: 13px; }
.btn.lg { padding: 22px 34px; font-size: 24px; }
.btn.xl { padding: 28px 44px; font-size: 34px; letter-spacing: -0.03em; }

.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--sb-ink); color: var(--sb-bone); cursor: pointer; border: 0; border-radius: 0; transition: background 120ms; }
.icon-btn:hover { background: var(--sb-red); }
.icon-btn.bone { background: var(--sb-bone); color: var(--sb-ink); }
.icon-btn.bone:hover { background: var(--sb-yellow); }
.icon-btn.lg { width: 56px; height: 56px; }

/* ============================================================
   02 — BADGES · tags · chips
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; padding: 6px 12px;
  font-family: var(--sb-font-ui); font-size: 13px; text-transform: lowercase;
  background: var(--sb-red); color: var(--sb-bone); border-radius: 0;
}
.tag.coral { background: var(--sb-coral); color: var(--sb-ink); }
.tag.peri  { background: var(--sb-periwinkle); color: var(--sb-ink); }
.tag.yellow{ background: var(--sb-yellow); color: var(--sb-ink); }
.tag.teal  { background: var(--sb-teal); color: var(--sb-bone); }
.tag.ink   { background: var(--sb-ink); color: var(--sb-bone); }
.tag.outline { background: transparent; color: var(--sb-ink); border: 1px solid var(--sb-ink); }

.tag-lg {
  display: inline-flex; align-items: center; padding: 4px 12px;
  font-family: var(--sb-font-display); font-size: 22px; letter-spacing: -0.02em;
  background: var(--sb-ink); color: var(--sb-bone); text-transform: lowercase;
}
.tag-lg.bracket::before { content: "["; }
.tag-lg.bracket::after  { content: "]"; }
.tag-lg.orange, .tag-lg.red { background: var(--sb-red); color: var(--sb-bone); }
.tag-lg.yellow { background: var(--sb-yellow); color: var(--sb-ink); }
.tag-lg.coral  { background: var(--sb-coral); color: var(--sb-ink); }
.tag-lg.peri   { background: var(--sb-periwinkle); color: var(--sb-ink); }
.tag-lg.teal   { background: var(--sb-teal); color: var(--sb-bone); }
.tag-lg.bone   { background: var(--sb-bone); color: var(--sb-ink); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 12px;
  font-family: var(--sb-font-ui); font-size: 12px; text-transform: lowercase;
  background: var(--sb-bone); color: var(--sb-ink); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}
.chip.on { background: var(--sb-ink); color: var(--sb-bone); box-shadow: none; }
.chip .x { opacity: 0.6; }
.chip.on .x { opacity: 1; }

.pill-num {
  min-width: 22px; height: 22px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sb-red); color: var(--sb-bone);
  font-family: var(--sb-font-ui); font-size: 11px; font-weight: 400;
}

/* ============================================================
   03 — FORMS · inputs
   ============================================================ */
.f-grid { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 1px; background: var(--sb-ink); }
.f-field { padding: 18px 22px; background: var(--sb-bone); }
.f-field.wide { grid-column: 1 / -1; }
.f-label { font-family: var(--sb-font-ui); font-size: 11px; text-transform: lowercase; letter-spacing: 0.02em; opacity: 0.55; margin-bottom: 6px; }
.f-in, .f-tex, .f-sel {
  display: block; width: 100%; background: transparent; border: 0; outline: 0;
  font-family: var(--sb-font-display); font-size: 20px; letter-spacing: -0.02em;
  color: var(--sb-ink); padding: 0; resize: vertical;
}
.f-in::placeholder, .f-tex::placeholder { color: var(--sb-ink); opacity: 0.3; }
.f-tex { min-height: 64px; }
.f-field.focus { background: var(--sb-yellow); }
.f-field.error .f-label { color: var(--sb-red); opacity: 1; }
.f-field.error { background: var(--sb-coral); }
.f-field.disabled { opacity: 0.4; pointer-events: none; }

/* hairline text input (bone field, ink hairline, red focus) */
.f-hair {
  display: block; width: 100%; padding: 16px 18px;
  border: 1px solid rgba(0,0,0,0.2); background: var(--sb-bone); border-radius: 0;
  font-family: var(--sb-font-ui); font-size: 17px; line-height: 1.3;
  letter-spacing: -0.01em; color: var(--sb-ink); outline: 0;
}
.f-hair:focus { outline: 2px solid var(--sb-red); outline-offset: -2px; }

/* checkbox / radio — square cells */
.box-row { display: flex; flex-direction: column; gap: 4px; }
.box-label { display: flex; align-items: center; gap: 12px; font-family: var(--sb-font-display); font-size: 18px; letter-spacing: -0.02em; cursor: pointer; }
.sb-check { width: 22px; height: 22px; background: var(--sb-bone); display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.sb-check.on { background: var(--sb-ink); box-shadow: none; }
.sb-check.on::after { content: ""; width: 10px; height: 10px; background: var(--sb-red); }
.sb-radio { width: 22px; height: 22px; background: var(--sb-bone); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.sb-radio.on { box-shadow: none; }
.sb-radio.on::after { content: ""; width: 10px; height: 10px; background: var(--sb-red); border-radius: 50%; }

/* switch */
.sb-switch { width: 56px; height: 28px; background: var(--sb-bone); position: relative; cursor: pointer; padding: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.sb-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: var(--sb-ink); transition: left 160ms, background 160ms; }
.sb-switch.on { background: var(--sb-red); box-shadow: none; }
.sb-switch.on::after { left: 31px; background: var(--sb-bone); }

/* segmented */
.segmented { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0; background: transparent; }
.segmented > * {
  display: inline-flex; align-items: center;
  min-height: 56px;
  padding: 0 18px;
  font-family: var(--sb-font-display);
  font-size: 22px;
  text-transform: lowercase;
  letter-spacing: -0.02em;
  cursor: pointer;
  background: var(--sb-bone);
}
.segmented > *:hover { background: var(--sb-yellow); }
.segmented > *.on { background: var(--sb-ink); color: var(--sb-bone); }

/* search */
.search { display: flex; align-items: center; width: 360px; background: var(--sb-bone); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.search .ic { padding: 0 14px; font-family: var(--sb-font-display); }
.search input { flex: 1; padding: 12px 12px 12px 0; background: transparent; border: 0; outline: 0; font-family: var(--sb-font-display); font-size: 17px; letter-spacing: -0.02em; color: var(--sb-ink); }
.search button { padding: 12px 18px; background: var(--sb-ink); color: var(--sb-bone); border: 0; font-family: var(--sb-font-display); font-size: 15px; text-transform: lowercase; cursor: pointer; }

/* slider */
.sb-slider { width: 320px; position: relative; padding: 12px 0; }
.sb-slider .track { height: 2px; background: var(--sb-ink); position: relative; }
.sb-slider .fill { height: 2px; background: var(--sb-red); position: absolute; top: 0; left: 0; }
.sb-slider .thumb { width: 18px; height: 18px; background: var(--sb-red); position: absolute; top: -8px; }
.sb-slider .ticks { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--sb-font-ui); font-size: 10px; text-transform: lowercase; opacity: 0.55; }

/* ============================================================
   04 — NAVIGATION
   ============================================================ */
.nav-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: stretch; background: var(--sb-bone); width: 100%; min-height: 96px; }
.nav-bar .wm { padding: 0 24px; display: flex; align-items: center; }
.nav-bar .wm img { height: 32px; display: block; }
.nav-bar .links { display: flex; align-items: center; gap: 0; padding: 0; }
.nav-bar .links a {
  display: flex; align-items: center;
  min-height: 96px;
  padding: 0 28px;
  font-family: var(--sb-font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--sb-ink);
  text-decoration: none;
  text-transform: lowercase;
  position: relative;
}
.nav-bar .links a.active { background: var(--sb-ink); color: var(--sb-bone); }
.nav-bar .links a.active::after { content: none; }
.nav-bar .links a:hover { color: var(--sb-red); }
.nav-bar .end { display: flex; justify-content: flex-end; align-items: center; }

/* language 2x2 */
.lang-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 48px);
  grid-template-rows: repeat(2, 48px);
  width: 96px;
  height: 96px;
  font-family: var(--sb-font-ui);
  font-size: 15px;
  text-transform: lowercase;
  gap: 0;
  background: transparent;
}
.lang-2x2 > * { display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--sb-bone); color: var(--sb-ink); border: 0; }
.lang-2x2 > *:hover { background: var(--sb-yellow); }
.lang-2x2 > *.on { background: var(--sb-ink); color: var(--sb-bone); }

/* tabs */
.tabs { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0; }
.tabs > * {
  background: transparent;
  cursor: pointer;
  font-family: var(--sb-font-display);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  padding: 0 28px 0 0;
  margin-right: 14px;
  color: var(--sb-ink);
  opacity: 0.5;
  transition: opacity 120ms;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.tabs > *:hover { opacity: 0.85; }
.tabs > *.on { opacity: 1; color: var(--sb-red); }
.tabs .c {
  font-family: var(--sb-font-ui);
  font-size: 14px;
  vertical-align: super;
  opacity: 0.7;
  letter-spacing: 0;
}

/* breadcrumb */
.breadcrumb { display: inline-flex; gap: 8px; font-family: var(--sb-font-ui); font-size: 12px; text-transform: lowercase; color: var(--sb-ink); }
.breadcrumb a { color: var(--sb-ink); text-decoration: none; opacity: 0.6; }
.breadcrumb a:hover { opacity: 1; color: var(--sb-red); }
.breadcrumb .s { opacity: 0.4; }
.breadcrumb .cur { opacity: 1; color: var(--sb-ink); }

/* pagination */
.paginator { display: inline-flex; align-items: center; gap: 0; background: transparent; }
.paginator > * {
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sb-font-display);
  font-size: 22px;
  cursor: pointer;
  background: var(--sb-bone);
}
.paginator > *.on { background: var(--sb-ink); color: var(--sb-bone); }
.paginator > *:hover:not(.on) { background: var(--sb-yellow); }

/* ============================================================
   05 — CARDS · tiles
   Cards are flat colored rectangles. No borders, no shadows.
   Every card fills its container (height:100%) yet keeps an
   intrinsic min-height when free-standing in the gallery.
   ============================================================ */

/* editorial / article card */
.art-card {
  padding: 24px; min-height: 320px; height: 100%;
  display: flex; flex-direction: column; gap: 16px;
  cursor: pointer; overflow: hidden;
  transition: background 120ms cubic-bezier(0.2,0,0,1), color 120ms;
}
.art-card .fmt { font-family: var(--sb-font-display); font-size: 22px; letter-spacing: -0.02em; color: var(--sb-red); text-transform: lowercase; }
.art-card h3 { font-family: var(--sb-font-display); font-weight: 400; font-size: 30px; line-height: 0.95; letter-spacing: -0.03em; margin: 0; flex: 1; text-transform: lowercase; }
.art-card .foot { display: flex; justify-content: space-between; font-family: var(--sb-font-ui); font-size: 12px; text-transform: lowercase; opacity: 0.7; }
.art-card.bone { background: var(--sb-bone); }
.art-card.bone .fmt { color: var(--sb-red); }
.art-card.bone:hover { background: var(--sb-yellow); }
.art-card.yellow { background: var(--sb-yellow); }
.art-card.yellow .fmt { color: var(--sb-ink); }
.art-card.yellow:hover { background: var(--sb-red); color: var(--sb-bone); }
.art-card.coral { background: var(--sb-coral); }
.art-card.coral .fmt { color: var(--sb-ink); }
.art-card.coral:hover { background: var(--sb-ink); color: var(--sb-bone); }
.art-card.peri { background: var(--sb-periwinkle); }
.art-card.peri .fmt { color: var(--sb-ink); }
.art-card.peri:hover { background: var(--sb-ink); color: var(--sb-bone); }
.art-card.ink { background: var(--sb-ink); color: var(--sb-bone); }
.art-card.ink .fmt { color: var(--sb-yellow); }
.art-card.ink:hover { background: var(--sb-red); }

/* event card — tag+time / title / place+date */
.event-card {
  padding: 24px; height: 100%; min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer; transition: filter 120ms;
}
.event-card .top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--sb-font-display); font-size: 17px; letter-spacing: -0.02em; }
.event-card .ttl { font-family: var(--sb-font-display); font-weight: 400; font-size: 32px; line-height: 0.92; letter-spacing: -0.035em; margin: 0; }
.event-card .foot { display: flex; justify-content: space-between; font-family: var(--sb-font-ui); font-size: 12px; letter-spacing: 0.02em; text-transform: lowercase; }
.event-card.peri  { background: var(--sb-periwinkle); }
.event-card.coral { background: var(--sb-coral); }
.event-card.yellow{ background: var(--sb-yellow); }
.event-card.teal  { background: var(--sb-teal); color: var(--sb-bone); }
.event-card.ink   { background: var(--sb-ink); color: var(--sb-bone); }
.event-card:hover { filter: brightness(0.97); }

/* event tile — square day/time (calendar) */
.event-tile { aspect-ratio: 1; height: 100%; padding: 18px; position: relative; display: flex; flex-direction: column; }
.event-tile .fmt { font-family: var(--sb-font-display); font-size: 14px; letter-spacing: -0.02em; }
.event-tile .dt { margin-top: auto; font-family: var(--sb-font-display); font-size: 30px; line-height: 0.85; letter-spacing: -0.03em; }
.event-tile.teal { background: var(--sb-teal); color: var(--sb-bone); }
.event-tile.orange, .event-tile.red { background: var(--sb-red); color: var(--sb-bone); }
.event-tile.peri { background: var(--sb-periwinkle); }
.event-tile.yellow { background: var(--sb-yellow); }

/* stat tile — label+index / big number / description */
.stat-card { padding: 24px; height: 100%; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; overflow: hidden; }
.stat-card .lab { font-family: var(--sb-font-ui); font-size: 12px; letter-spacing: 0.04em; text-transform: lowercase; display: flex; justify-content: space-between; }
.stat-card .lab .idx { opacity: 0.45; }
.stat-card .num { font-family: var(--sb-font-display); font-weight: 400; font-size: 96px; line-height: 0.82; letter-spacing: -0.045em; margin: 0; }
.stat-card .desc { font-family: var(--sb-font-display); font-size: 22px; line-height: 0.95; letter-spacing: -0.02em; max-width: 220px; }
.stat-card.bone { background: var(--sb-bone); color: var(--sb-ink); }
.stat-card.yellow { background: var(--sb-yellow); color: var(--sb-ink); }
.stat-card.coral { background: var(--sb-coral); color: var(--sb-ink); }
.stat-card.peri { background: var(--sb-periwinkle); color: var(--sb-ink); }
.stat-card.teal { background: var(--sb-teal); color: var(--sb-bone); }
.stat-card.ink { background: var(--sb-ink); color: var(--sb-bone); }

/* course card — level code / title / meta + optional motif */
.course-card { padding: 24px; height: 100%; min-height: 252px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; overflow: hidden; position: relative; cursor: pointer; transition: transform 120ms cubic-bezier(0.2,0,0,1); }
.course-card .code { font-family: var(--sb-font-display); font-size: 80px; line-height: 0.78; letter-spacing: -0.04em; }
.course-card .ttl { font-family: var(--sb-font-display); font-size: 24px; letter-spacing: -0.03em; text-transform: lowercase; line-height: 0.95; }
.course-card .meta { font-family: var(--sb-font-ui); font-size: 11px; text-transform: lowercase; letter-spacing: 0.02em; opacity: 0.65; display: flex; justify-content: space-between; }
.course-card .motif { position: absolute; right: 16px; top: 16px; width: 84px; height: 84px; opacity: 0.95; }
.course-card:hover .code { color: var(--sb-red); }
.course-card.bone { background: var(--sb-bone); }
.course-card.coral { background: var(--sb-coral); }
.course-card.peri { background: var(--sb-periwinkle); }
.course-card.yellow { background: var(--sb-yellow); }
.course-card.mint { background: var(--sb-mint); }
.course-card.sky { background: var(--sb-sky); }
.course-card.teal { background: var(--sb-teal); color: var(--sb-bone); }

/* ============================================================
   06 — MOTIF · css tile primitives
   (the React tile primitives live in src/tiles.jsx)
   ============================================================ */
.tile-check { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 100%; height: 100%; }
.tile-stripes { width: 100%; height: 100%; background: repeating-linear-gradient(to bottom, var(--sb-yellow) 0 12.5%, var(--sb-red) 12.5% 25%); }
.tile-stripes.hor { background: repeating-linear-gradient(to right, var(--sb-yellow) 0 12.5%, var(--sb-red) 12.5% 25%); }
.tile-stripes.peri-coral { background: repeating-linear-gradient(to bottom, var(--sb-periwinkle) 0 12.5%, var(--sb-coral) 12.5% 25%); }
.tile-stripes.teal-bone { background: repeating-linear-gradient(to bottom, var(--sb-teal) 0 12.5%, var(--sb-bone) 12.5% 25%); }

/* ============================================================
   07 — DATA · list, identity, progress
   ============================================================ */
.sb-list { width: 100%; display: flex; flex-direction: column; gap: 0; background: transparent; }
.sb-list .row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 120px 120px 100px;
  align-items: center;
  width: 100%;
}
.sb-list .row.head {
  min-height: auto;
  padding: 0 22px 16px;
  background: transparent;
  color: var(--sb-ink);
  font-family: var(--sb-font-ui);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  opacity: 0.55;
}
.sb-list .row.body {
  min-height: var(--m);
  padding: 0 22px;
  font-family: var(--sb-font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  background: var(--sb-bone);
  transition: background 120ms cubic-bezier(0.2,0,0,1);
}
.sb-list .row.body:nth-child(even) { background: var(--sb-yellow); }
.sb-list .row.body:hover { background: var(--sb-coral); }
.sb-list .row .ttl { font-family: var(--sb-font-display); font-size: 24px; letter-spacing: -0.02em; text-transform: lowercase; }
.sb-list .row.body > :first-child {
  font-size: 32px;
  letter-spacing: -0.035em;
  color: var(--sb-red);
}
.sb-list .row .st { display: inline-block; padding: 2px 8px; font-family: var(--sb-font-ui); font-size: 11px; text-transform: lowercase; }
.sb-list .row .st.live { background: var(--sb-red); color: var(--sb-bone); }
.sb-list .row .st.soon { background: var(--sb-yellow); }
.sb-list .row .st.done { background: var(--sb-bone); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }

/* avatar / identity */
.av { width: 44px; height: 44px; background: var(--sb-yellow); display: inline-flex; align-items: center; justify-content: center; font-family: var(--sb-font-display); font-size: 17px; letter-spacing: -0.02em; text-transform: lowercase; color: var(--sb-ink); }
.av.lg { width: 64px; height: 64px; font-size: 24px; }
.av.coral { background: var(--sb-coral); }
.av.peri { background: var(--sb-periwinkle); }
.av.teal { background: var(--sb-teal); color: var(--sb-bone); }
.av.ink { background: var(--sb-ink); color: var(--sb-bone); }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -10px; box-shadow: 0 0 0 2px var(--sb-bone); }

/* progress */
.progress { width: 320px; height: 18px; background: var(--sb-bone); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.progress .bar { height: 100%; background: var(--sb-red); }
.progress.stripes .bar { background: repeating-linear-gradient(45deg, var(--sb-red) 0 8px, var(--sb-coral) 8px 16px); }

/* loader 2x2 dots */
.loader { display: inline-grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 36px; height: 36px; gap: 2px; }
.loader > div { animation: sb-pulse 1.2s infinite ease-in-out; }
.loader > div:nth-child(1) { background: var(--sb-red); }
.loader > div:nth-child(2) { background: var(--sb-yellow); animation-delay: 0.15s; }
.loader > div:nth-child(3) { background: var(--sb-yellow); animation-delay: 0.45s; }
.loader > div:nth-child(4) { background: var(--sb-red); animation-delay: 0.3s; }
@keyframes sb-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* keyboard */
kbd { display: inline-block; padding: 2px 8px; font-family: var(--sb-font-mono); font-size: 11px; background: var(--sb-bone); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18); }

/* icon tray */
.icon-tray { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; gap: 1px; background: var(--sb-ink); }

@media (max-width: 900px) {
  .f-grid {
    grid-template-columns: 1fr;
  }

  .search,
  .sb-slider,
  .progress,
  .sb-list {
    width: 100%;
    max-width: 100%;
  }

  .sb-list .row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px 16px;
  }

  .sb-list .row.head {
    display: none;
  }

  .sb-list .row.body {
    min-height: auto;
    padding: 16px var(--pad);
  }

  .sb-list .row.body > :first-child {
    font-size: 26px;
  }

  .sb-list .row.body > :nth-child(3),
  .sb-list .row.body > :nth-child(4),
  .sb-list .row.body > :nth-child(5) {
    grid-column: 2 / 3;
    font-size: 16px;
    line-height: 1.15;
  }

  .sb-list .row .ttl {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  .tabs,
  .segmented {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .btn {
    padding: 16px 18px;
    font-size: 18px;
    gap: 10px;
  }

  .btn.lg {
    padding: 18px 20px;
    font-size: 20px;
  }

  .btn.xl {
    padding: 20px 24px;
    font-size: 24px;
  }

  .art-card {
    min-height: calc(var(--m) * 1.85);
    height: auto;
    padding: var(--pad);
  }

  .art-card .fmt { font-size: 18px; }
  .art-card h3 {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .event-card {
    min-height: calc(var(--m) * 1.85);
    height: auto;
    padding: var(--pad);
  }

  .event-card .top { font-size: 14px; }
  .event-card .ttl {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .stat-card {
    min-height: calc(var(--m) * 1.6);
    height: auto;
    padding: var(--pad);
  }

  .stat-card .num {
    font-size: clamp(48px, 16vw, 72px);
    line-height: 0.86;
  }
  .stat-card .desc {
    font-size: 16px;
    line-height: 1.05;
    max-width: none;
    overflow-wrap: anywhere;
  }

  .course-card {
    min-height: calc(var(--m) * 1.85);
    height: auto;
    padding: var(--pad);
  }

  .course-card .code {
    font-size: clamp(46px, 18vw, 64px);
    line-height: 0.86;
  }
  .course-card .ttl {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .tag,
  .tag-lg,
  .chip {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .course-card .motif {
    width: 56px;
    height: 56px;
    right: 12px;
    top: 12px;
  }
}
.icon-tray > * { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 18px; position: relative; background: var(--sb-bone); }
.icon-tray > * svg { width: 100%; height: 100%; display: block; }
.icon-tray .name { position: absolute; bottom: 6px; left: 8px; font-family: var(--sb-font-ui); font-size: 9px; text-transform: lowercase; opacity: 0.55; }

/* ============================================================
   08 — FEEDBACK · toasts, alerts
   ============================================================ */
.toast { display: inline-flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--sb-ink); color: var(--sb-bone); font-family: var(--sb-font-display); font-size: 15px; letter-spacing: -0.02em; text-transform: lowercase; }
.toast .ic { width: 14px; height: 14px; background: var(--sb-red); flex: none; }
.toast.yellow { background: var(--sb-yellow); color: var(--sb-ink); }
.toast.yellow .ic { background: var(--sb-ink); }
.toast.coral { background: var(--sb-coral); color: var(--sb-ink); }
.toast.coral .ic { background: var(--sb-red); }

.alert { padding: 18px 22px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.alert .ic { font-family: var(--sb-font-display); font-size: 22px; }
.alert .msg { font-family: var(--sb-font-display); font-size: 17px; letter-spacing: -0.02em; line-height: 1.2; }
.alert .msg b { font-weight: 400; }
.alert .x { font-family: var(--sb-font-ui); font-size: 12px; text-transform: lowercase; cursor: pointer; opacity: 0.7; }
.alert.info { background: var(--sb-periwinkle); }
.alert.ok { background: var(--sb-teal); color: var(--sb-bone); }
.alert.warn { background: var(--sb-yellow); }
.alert.err { background: var(--sb-coral); }
