/* =====================================================================
   MACEDONIA (MSV) — polish layer (2026-10-27, web_renew_1027)
   Loaded LAST on the home page and the 9 public sub-pages (admin excluded).
   One set of tokens + consistent focus, type minimums, form/button/board
   treatment, the new home race panel and the sub-page footer.
   Brand = obsidian + antique gold (assets unchanged).  No layout rewrites:
   every rule here only tightens what the existing layers already do.
   ===================================================================== */
:root{
  --msv-ink:#090e12;
  --msv-ink-2:#0d1418;
  --msv-surface:#111b21;
  --msv-surface-2:#16232b;
  --msv-line:rgba(196,168,112,.22);
  --msv-line-strong:rgba(214,186,126,.5);
  --msv-gold:#d0b27a;
  --msv-gold-hi:#ecd7a8;
  --msv-gold-deep:#a8894f;
  --msv-text:#ece8dc;
  --msv-text-2:#c4c9c5;
  --msv-text-3:#a2acab;
  --msv-focus:#f0d396;
  --msv-radius:3px;
  --msv-ease:cubic-bezier(.2,.7,.2,1);
  --msv-gutter:clamp(16px,4vw,40px);
}

/* ---------- global ---------- */
html{scrollbar-color:#5b4c32 #0b1115}
::selection{background:#cfb27a;color:#141210}
:lang(ko) :is(h1,h2,h3,h4,.service-label,.msv-race-copy strong){word-break:keep-all}
time,.nw-date,.news-row time,.b-date,.b-views,.b-no{font-variant-numeric:tabular-nums}

/* one visible focus ring everywhere (keyboard only) */
:is(a,button,summary,[role="tab"],[tabindex]:not([tabindex="-1"])):focus-visible{
  outline:2px solid var(--msv-focus)!important;outline-offset:3px!important;border-radius:2px;
}
:is(input,select,textarea):focus-visible{
  outline:2px solid var(--msv-focus)!important;outline-offset:1px!important;
}
.skip-link:focus{z-index:10000}

/* small decorative overlines: never below 12px (were 8–11px) */
.feature-overline,.chapter-heading>p,.chronicle-mast,.chronicle-mast>span:last-child,.chronicle-panel-head p,
.chronicle-story-label,.service-legend,.news-support-links small,.eyebrow,.kicker,.nw-category,.login-hint,
.gd-cat-k,.prep-eyebrow,.prep-route-type,.hero-note,.scroll-cue span,.news-category,.prestige-footer h2,.msv-foot-nav h2{
  font-size:12px!important;
}
.service-legend{letter-spacing:.12em!important;color:#b3a689!important}
.prestige-footer .footer-brand small,.prestige-footer>p,.msv-foot-brand small{font-size:12px!important}
.news-support-links small,.login-hint{color:var(--msv-text-3)!important}

/* ---------- home: hero ---------- */
.hero-sub-link{
  display:inline-flex;align-items:center;gap:10px;margin-top:18px;min-height:44px;padding:8px 6px;
  font-size:15px;letter-spacing:.02em;color:#efe3c6;text-shadow:0 2px 10px #000;
  border-bottom:1px solid #e3c88f59;transition:color .2s,border-color .2s;
}
.hero-sub-link:hover{color:#fff3d6;border-color:#ead39f}
.hero-sub-link>span:last-child{transition:transform .2s var(--msv-ease)}
.hero-sub-link:hover>span:last-child{transform:translateX(3px)}
@media(max-width:700px){.hero-sub-link{font-size:14px;margin-top:14px}}

/* ---------- home: services row (ranking removed → 4 columns) ---------- */
.service-strip.service-emblems{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:700px){
  .service-strip.service-emblems{grid-template-columns:repeat(2,minmax(0,1fr))}
  .service-strip.service-emblems>a,
  .service-strip.service-emblems>a:nth-child(n+4),
  .service-strip.service-emblems>a:last-child{grid-column:span 1;flex-direction:column;min-height:150px;border-left:1px solid #c5af7e20;border-top:0}
  .service-strip.service-emblems>a:nth-child(odd){border-left:0}
  .service-strip.service-emblems>a:nth-child(n+3){border-top:1px solid #c5af7e20}
}

/* ---------- home: three races panel (replaces the old ranking panel) ---------- */
.chronicle-races{
  min-width:0;background:linear-gradient(135deg,#172329eb,#091218f0);
  border:1px solid #ad956555;border-top:2px solid #c5aa76;box-shadow:0 22px 65px #0006;backdrop-filter:blur(9px);
}
.chronicle-races .chronicle-panel-head{padding:24px 26px 14px}
.msv-race-list{list-style:none;margin:0;padding:0 14px 14px}
.msv-race-row{
  display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:16px;
  padding:12px;border-top:1px solid #b19a6c22;color:inherit;transition:background-color .2s,transform .2s var(--msv-ease);
}
.msv-race-list li:first-child .msv-race-row{border-top:0}
.msv-race-row img{width:72px;height:72px;object-fit:cover;border:1px solid #c5aa7666;box-shadow:inset 0 0 0 1px #000;background:#0d1418}
.msv-race-copy{display:grid;gap:2px;min-width:0}
.msv-race-copy small{font-size:12px;letter-spacing:.04em;color:#b8a27a}
.msv-race-copy strong{font-size:19px;font-weight:500;color:#efe7d4;letter-spacing:-.02em;line-height:1.35}
.msv-race-classes{font-size:13.5px;line-height:1.55;color:var(--msv-text-3);text-wrap:pretty}
.msv-race-row>i{font-style:normal;font-size:20px;color:#c9ad73;transition:transform .2s var(--msv-ease)}
.msv-race-row:hover{background:#d5b97a0d}
.msv-race-row:hover>i{transform:translate(2px,-2px);color:#f0d9a6}
.msv-race-row:hover strong{color:#fff4da}
@media(max-width:420px){
  .chronicle-races .chronicle-panel-head{padding:20px 18px 10px}
  .msv-race-list{padding:0 8px 10px}
  .msv-race-row{grid-template-columns:60px minmax(0,1fr) auto;gap:13px;padding:11px 10px}
  .msv-race-row img{width:60px;height:60px}
  .msv-race-copy strong{font-size:18px}
}
.chronicle-description{color:#c9cfcc}

/* ---------- sub-pages: hero ---------- */
.msv-refined .page-hero p:not(.eyebrow){color:#c8cecb;line-height:1.75}

/* ---------- tabs (news / community) ---------- */
.msv-refined .tabs .tab-btn{min-height:48px;font-size:15px}
.msv-refined .tabs .tab-btn:not(.active):hover{color:#efe0bd}

/* ---------- forms ---------- */
.msv-refined :is(.msv-form,form) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){
  border-color:rgba(200,172,112,.42)!important;background-color:#0b1216!important;
  transition:border-color .2s,box-shadow .2s;
}
.msv-refined :is(.msv-form,form) :is(input:not([type=checkbox]):not([type=radio]),select,textarea):hover{border-color:rgba(214,186,126,.62)!important}
.msv-refined :is(.msv-form,form) :is(input:not([type=checkbox]):not([type=radio]),select,textarea):focus{
  border-color:#d9bb80!important;box-shadow:0 0 0 3px rgba(217,187,128,.16)!important;
}
.msv-refined :is(input,textarea)::placeholder{color:#7f8b8b;opacity:1}
.msv-refined .msv-form label{font-size:14px}
.msv-refined .form-note,.msv-refined .muted{color:#b2b4ab}

/* ---------- buttons: one height, one rhythm ---------- */
.msv-refined .btn{min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:14px;line-height:1.3}
.msv-refined .btn-red{font-size:14px}
.msv-refined .btn:disabled{opacity:.5;cursor:not-allowed}

/* ---------- boards (community / trade / admin-free) ---------- */
.msv-refined .board-row{font-size:15px;min-height:56px}
.msv-refined .board-row .b-meta{font-size:13px;color:#a6aeac}
.msv-refined .board-row .b-title{color:#f0ebde}
.msv-refined .board-head{font-size:12.5px;letter-spacing:.06em;color:#b9ab8a}
.msv-refined .board-empty{
  display:grid;place-items:center;gap:10px;min-height:190px;padding:40px 20px;text-align:center;
  font-size:15px;color:var(--msv-text-3);
}
.msv-refined .pager button{min-width:40px;height:40px;font-size:14px}

/* ---------- news list ---------- */
.msv-refined .nw-item .nw-title{line-height:1.5}
.msv-refined .nw-item .nw-meta{color:#a6aeac}

/* ---------- scroll reveal: shorter + smaller travel (content readable sooner) ---------- */
html.js-reveal [data-reveal]{transform:translateY(10px);transition-duration:.38s!important}

/* ---------- sub-page footer (link columns like the home footer) ---------- */
.msv-refined .footer .msv-foot-top{
  display:grid;grid-template-columns:minmax(0,1.3fr) repeat(3,minmax(0,1fr));gap:32px;align-items:start;
  padding-top:44px;padding-bottom:30px;
}
.msv-foot-brand{display:inline-flex;align-items:center;gap:13px;color:#e8d5a8}
.msv-foot-brand img{width:40px;height:40px;object-fit:contain}
.msv-foot-brand span{font:17px/1.2 Georgia,'Times New Roman',serif;letter-spacing:.14em}
.msv-foot-brand small{display:block;margin-top:5px;font:12px/1.3 Georgia,serif;letter-spacing:.2em;color:#a2967b}
.msv-refined .footer nav.msv-foot-nav{display:grid;gap:4px;align-content:start;justify-content:start;flex-wrap:nowrap}
.msv-refined .footer .msv-foot-nav h2{margin:0 0 8px;font:12px/1.4 Georgia,serif;letter-spacing:.18em;color:#bea773;font-weight:400}
.msv-refined .footer .msv-foot-nav a{display:inline-flex;align-items:center;min-height:34px;font-size:14px;color:#c3c8c4;justify-self:start;transition:color .2s}
.msv-refined .footer .msv-foot-nav a:hover{color:#f2dfb6}
@media(max-width:800px){
  .msv-refined .footer .msv-foot-top{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 18px;padding-top:34px}
  .msv-foot-id{grid-column:1/-1}
}
@media(max-width:420px){
  .msv-refined .footer .msv-foot-top{gap:20px 12px}
  .msv-refined .footer .msv-foot-nav a{min-height:38px;font-size:14px}
  .msv-refined .footer .msv-foot-nav h2{letter-spacing:.12em}
}
@media(max-width:700px){
  .msv-refined .finder-footer{padding-inline:16px;box-sizing:border-box}
}

/* ---------- motion & contrast preferences ---------- */
@media(prefers-reduced-motion:reduce){
  .hero-video{display:none!important}
  html.js-reveal [data-reveal]{opacity:1!important;transform:none!important;transition:none!important}
  .msv-race-row,.msv-race-row>i,.hero-sub-link>span:last-child{transition:none}
}
@media(forced-colors:active){
  .msv-race-row{border-top:1px solid CanvasText}
  .msv-foot-nav a,.hero-sub-link{color:LinkText}
}
