/* Layout: a sticky site-board header closed by one band of hazard tape; lists are a filter bar over a card grid;
   a tender page is a project signboard followed by its bids. */
:root {
  --bg: #EFF1EE; --surface: #FFFFFF; --sunk: #E5E8E3; --ink: #18212B; --muted: #5A6470; --line: #D3D8D1;
  --accent: #F2B705; --on-accent: #18212B; --star: #C98F00; --tape: #18212B;
  --blue: #1E4F7A; --info-bg: #E1EBF4;
  --good: #2C7649; --good-bg: #E1F0E6; --warn: #94560B; --warn-bg: #FAEED8; --bad: #A6312A; --bad-bg: #F7E2DF;
  --c0: #2F6FA8; --c1: #2C7649; --c2: #9A5A0C; --c3: #7A3E9D; --c4: #A6312A; --c5: #1F7A7A;
  --font-display: "Reem Kufi", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151B; --surface: #182028; --sunk: #0C1116; --ink: #E5E9ED; --muted: #97A1AC; --line: #2A3440;
    --accent: #F2B705; --on-accent: #10151B; --star: #F2B705; --tape: #0A0E12;
    --blue: #86B6E3; --info-bg: #162636;
    --good: #6DC791; --good-bg: #15301F; --warn: #EBA654; --warn-bg: #35260F; --bad: #F08A80; --bad-bg: #3A1A17;
    --c0: #6FA8DC; --c1: #6DC791; --c2: #EBA654; --c3: #C59BE0; --c4: #F08A80; --c5: #6CC9C9;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: clip; /* full-bleed bands are 100vw wide, which includes a classic scrollbar */
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; }
a { color: var(--blue); }
h1, h2, h3 { text-wrap: balance; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap {
  max-width: 1180px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* header */
.top { position: sticky; top: 0; z-index: 5; background: var(--surface); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; gap: 12px 20px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.mark { width: 40px; height: 40px; flex: none; display: block; }
.brand b { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1.05; font-weight: 700; }
.brand small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.tabs a { color: var(--muted); font-weight: 600; padding: 8px 14px; border-radius: 4px; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--sunk); box-shadow: inset 0 -3px 0 var(--accent); }
.top-act { display: flex; gap: 8px; align-items: center; }
.top-act form { margin: 0; }
.tape { height: 7px; background: repeating-linear-gradient(-45deg, var(--accent) 0 11px, var(--tape) 11px 22px); }
@media (max-width: 680px) {
  .tabs { order: 3; flex-basis: 100%; }
  .tabs a { flex: 1; text-align: center; padding-inline: 6px; }
  .top-in { justify-content: space-between; }
  .brand small { display: none; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(.95); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 32px; padding: 4px 11px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.linkish { color: var(--ink); font-weight: 700; text-decoration: none; }
.linkish:hover { text-decoration: underline; }

.flash { margin-top: 14px; padding: 10px 14px; border-radius: 6px; font-size: 14px; font-weight: 500; }
.flash.good { background: var(--good-bg); color: var(--good); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }

/* home: one headline and the registered-contractors count */
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; padding-block: 30px 22px; }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.3vw, 38px); line-height: 1.35; margin: 0; max-width: 22ch; }
.lead { color: var(--muted); margin: 10px 0 0; max-width: 58ch; }
.reg {
  display: flex; align-items: center; gap: 14px; margin: 0; padding-block: 8px; padding-inline: 18px 8px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 15px; font-weight: 700;
}
.reg span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); margin-inline-end: 10px; vertical-align: 2px; }
.reg-n {
  font-family: var(--font-mono); font-size: 28px; font-weight: 600; line-height: 46px; font-variant-numeric: tabular-nums;
  min-width: 64px; padding-inline: 12px; text-align: center; border-radius: 6px; background: var(--accent); color: var(--on-accent);
}

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-block: 14px 10px; border-top: 1px solid var(--line); margin: 0; }
.view-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; justify-content: space-between; padding-block: 24px 6px; }
.view-head h1 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); margin: 0; line-height: 1.3; }
.view-head p { margin: 2px 0 0; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 4px; padding: 7px 10px; min-height: 40px; max-width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
.filters input[type="search"] { flex: 1 1 220px; min-width: 0; }
.filters select { flex: 0 1 auto; min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--surface); max-width: 100%; margin-inline-start: auto; }
.seg a { border-inline-start: 1px solid var(--line); padding: 7px 12px; color: var(--muted); font-size: 13.5px; white-space: nowrap; text-decoration: none; }
.seg a:first-child { border-inline-start: 0; }
.seg a[aria-current="page"] { background: var(--ink); color: var(--surface); }
.seg .n { font-family: var(--font-mono); font-size: 12px; opacity: .8; margin-inline-start: 5px; }
@media (max-width: 680px) { .seg { margin-inline-start: 0; } }

/* grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 14px; padding-block: 8px 40px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.card:hover { border-color: var(--muted); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ref { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.card h3 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 700; }
.card-link { color: var(--ink); text-decoration: none; }
.card .card-link::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.card-link:focus-visible { outline: none; }
.card .card-link:focus-visible::after { outline: 2px solid var(--blue); outline-offset: 2px; }
.meta { margin: 0; color: var(--muted); font-size: 13.5px; }
.excerpt { margin: 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.figs { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: 8px; margin: auto 0 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.figs dt { font-size: 12px; color: var(--muted); }
.figs dd { margin: 0; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; line-height: 1.5; }
.card-foot { display: flex; justify-content: space-between; gap: 6px 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--sunk); padding: 1px 8px; border-radius: 3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.info { background: var(--info-bg); color: var(--blue); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.done { background: var(--sunk); color: var(--muted); }
.pager { display: flex; gap: 12px; justify-content: center; align-items: center; padding-bottom: 40px; color: var(--muted); }

/* contractor identity */
.con-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.con-top > div { min-width: 0; }
.stamp {
  --c: var(--c0);
  width: 44px; height: 44px; flex: none; border-radius: 4px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink);
  background: color-mix(in srgb, var(--c) 20%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line));
}
.stamp.c1 { --c: var(--c1); } .stamp.c2 { --c: var(--c2); } .stamp.c3 { --c: var(--c3); } .stamp.c4 { --c: var(--c4); } .stamp.c5 { --c: var(--c5); }
.stamp.big { width: 64px; height: 64px; font-size: 30px; }
.rating { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rating b { color: var(--ink); font-family: var(--font-mono); font-weight: 600; }
.stars { color: var(--star); letter-spacing: 1px; font-size: 14px; line-height: 1; }
.stars .off { color: var(--line); }
.chips-ro { display: flex; flex-wrap: wrap; gap: 5px; }
.chips-ro span { font-size: 12px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 3px; }

.empty {
  grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 6px; padding: 32px 20px; text-align: center;
  display: grid; gap: 10px; justify-items: center; background: var(--surface);
}
.empty h3 { margin: 0; font-family: var(--font-display); font-size: 20px; line-height: 1.4; }
.empty p { margin: 0; color: var(--muted); max-width: 56ch; }

/* tender + contractor pages */
.crumbs { padding-top: 20px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.detail { max-width: 860px; display: grid; gap: 20px; padding-block: 12px 56px; }
.sec h2 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.desc { margin: 0; white-space: pre-line; overflow-wrap: anywhere; max-width: 72ch; }
.board { border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; background: var(--surface); }
.board-head { background: var(--ink); color: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px; flex-wrap: wrap; }
.board-head .ref { color: inherit; opacity: .9; font-size: 12.5px; }
.board h1 { margin: 0; padding: 14px 14px 2px; font-family: var(--font-display); font-size: clamp(22px, 3vw, 28px); line-height: 1.4; overflow-wrap: anywhere; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px 18px; margin: 0; padding: 10px 14px 16px; }
.board-grid dt { font-size: 12px; color: var(--muted); }
.board-grid dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.board-grid dd small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.actionbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.actionbar form, .bid-act form { margin: 0; }
.callout { padding: 10px 14px; border-radius: 6px; font-size: 14px; font-weight: 500; }
.callout.good { background: var(--good-bg); color: var(--good); }
.callout.info { background: var(--info-bg); color: var(--blue); }
.callout.warn { background: var(--warn-bg); color: var(--warn); }
.callout.done { background: var(--sunk); color: var(--muted); }
.callout a { color: inherit; font-weight: 700; }
.sealed { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 6px; margin-bottom: 10px; }

.bid-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted); margin: -2px 0 10px; }
.bid-sum b { color: var(--ink); font-family: var(--font-mono); font-weight: 600; }
.bids { display: grid; gap: 10px; }
.bid { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; background: var(--surface); }
.bid.won { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.bid.mine { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.bid-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.bid-who > div { min-width: 0; }
.bid-price { text-align: end; display: grid; justify-items: end; align-content: start; }
.money { font-family: var(--font-mono); font-weight: 600; font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.money small { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--muted); }
.bid-price .sub { font-size: 12px; color: var(--muted); }
.facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.facts li { font-size: 12.5px; background: var(--sunk); padding: 2px 9px; border-radius: 3px; }
.bid-note { grid-column: 1 / -1; margin: 0; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.bid-act { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bid-act:empty { display: none; }
@media (max-width: 520px) {
  .bid { grid-template-columns: 1fr; }
  .bid-price { text-align: start; justify-items: start; }
}

.con-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-top: 16px; }
.con-head h1 { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3vw, 30px); line-height: 1.3; overflow-wrap: anywhere; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 6px; margin: 0; background: var(--surface); }
.kpis div { padding: 10px 14px; border-inline-start: 1px solid var(--line); min-width: 0; }
.kpis div:first-child { border-inline-start: 0; }
.kpis dt { font-size: 12px; color: var(--muted); }
.kpis dd { margin: 0; font-family: var(--font-mono); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpis dd small { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis div:nth-child(3) { border-inline-start: 0; }
  .kpis div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.bars { display: grid; gap: 8px; max-width: 460px; }
.bar { display: grid; grid-template-columns: 120px 1fr 34px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar meter { width: 100%; height: 8px; }
.bar span:last-child { font-family: var(--font-mono); font-weight: 600; text-align: end; }
meter { appearance: none; border: 0; border-radius: 4px; background: var(--sunk); }
meter::-webkit-meter-bar { background: var(--sunk); border: 0; border-radius: 4px; height: 8px; }
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value { background: var(--star); border-radius: 4px; }
meter::-moz-meter-bar { background: var(--star); border-radius: 4px; }
.contact { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.contact .sel { font-family: var(--font-mono); font-size: 16px; font-weight: 600; user-select: all; padding: 4px 10px; background: var(--sunk); border-radius: 4px; }
.reviews { display: grid; gap: 10px; }
.review { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; display: grid; gap: 6px; background: var(--surface); }
.review-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.review-top b { color: var(--ink); }
.review p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.subr { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }

/* account */
.mine { display: grid; gap: 30px; padding-block: 8px 56px; }
.mine h2 { font-family: var(--font-display); font-size: 21px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.mine h2 .n { font-family: var(--font-mono); font-size: 14px; color: var(--muted); font-weight: 500; }
.rows { display: grid; gap: 8px; }
.rowi { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.rowi:hover { border-color: var(--muted); }
.rowi .t { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.rowi .card-link::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.rowi .s { grid-column: 1; font-size: 13px; color: var(--muted); }
.rowi .e { grid-row: 1 / 3; grid-column: 2; display: grid; justify-items: end; gap: 4px; text-align: end; }
.panel { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.panel p { margin: 0; color: var(--muted); max-width: 60ch; }
.panel-form { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 16px; max-width: 760px; }

/* forms */
.page { padding-block: 24px 56px; }
.page.narrow { max-width: 760px; }
.page.auth { max-width: 440px; }
.page > h1 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); margin: 0; line-height: 1.3; }
.page > .lead { margin-bottom: 18px; }
.page > .ctx { margin-block: 14px 6px; }
.form { display: grid; gap: 16px; margin-top: 16px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; }
.f { display: grid; gap: 5px; min-width: 0; border: 0; padding: 0; margin: 0; }
.lbl { font-size: 13.5px; font-weight: 600; padding: 0; }
.lbl em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; margin-inline-start: 2px; }
.f input, .f select, .f textarea { width: 100%; }
/* password with show/hide eye: the button sits at the left edge, where an LTR password starts, so pad that side */
.pw { position: relative; }
.pw:has(.pw-eye:not([hidden])) input { padding-left: 46px; }
.pw-eye {
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 3px; background: none; color: var(--muted); cursor: pointer; padding: 0;
}
.pw-eye[hidden] { display: none; }
.pw-eye:hover { color: var(--ink); background: var(--sunk); }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye .i-hide, .pw-eye[aria-pressed="true"] .i-show { display: none; }
.pw-eye[aria-pressed="true"] .i-hide { display: block; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--bad); }
.err { color: var(--bad); font-size: 13px; font-weight: 500; }
textarea { min-height: 110px; resize: vertical; line-height: 1.65; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { position: relative; }
.chk input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.chk span { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chk input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chk input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { min-height: 0; width: 18px; height: 18px; }
.form-err { margin: 0; padding: 8px 12px; border-radius: 6px; background: var(--bad-bg); color: var(--bad); font-size: 13.5px; font-weight: 500; }
.form-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.ctx { background: var(--sunk); border-radius: 6px; padding: 10px 14px; font-size: 13.5px; display: grid; gap: 2px; }
.ctx b { font-size: 15px; }
.ppm { font-size: 13px; color: var(--muted); min-height: 1.5em; margin-top: -8px; }

/* star rating: radios in 5..1 order, laid out so 1 sits at the reading start */
.rate-row { display: flex; justify-content: space-between; align-items: center; gap: 4px 10px; flex-wrap: wrap; padding: 6px 0; margin: 0; border: 0; border-bottom: 1px solid var(--line); }
.rate-row legend { float: inline-start; padding: 0; }
.rate-row .err { flex-basis: 100%; }
.stars-in { display: inline-flex; flex-direction: row-reverse; }
.stars-in input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.stars-in label { font-size: 28px; line-height: 1; padding: 2px; color: var(--line); cursor: pointer; }
.stars-in input:checked ~ label, .stars-in label:hover, .stars-in label:hover ~ label { color: var(--star); }
.stars-in input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 1px; border-radius: 3px; }

.foot { border-top: 1px solid var(--line); padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 13px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover { color: var(--ink); }

.prose h2 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { line-height: 1.85; }
.prose ul { padding-inline-start: 20px; margin: 0; }
.prose a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.info { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.info > div { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 4px 14px; padding: 10px 14px; }
.info > div + div { border-top: 1px solid var(--line); }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.info dd[dir="ltr"] { text-align: right; }
@media (max-width: 480px) { .info > div { grid-template-columns: 1fr; } }
.prose .en { margin-top: 36px; border-top: 1px solid var(--line); text-align: left; font-family: system-ui, sans-serif; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
