/* Border Desk - "survey sheet" visual system.
   Cool sage paper, deep ink rail, one accent (frontier blue) for the border,
   one alarm colour (signal red) reserved for conflict. */
:root {
  /* Base colours: set by the theme preset + admin overrides (see js/theme.js). Everything else derives from them. */
  --paper: #e8ece4; --sheet: #f5f6f1; --ink: #14232b; --frontier: #1d5d8c; --signal: #a8281f;
  --bar: #14232b; --barink: #e6eee9; --input: #ffffff;
  --gold: #8f6410; --moss: #3c6a52;
  --ink-2: color-mix(in srgb, var(--ink) 74%, var(--sheet));
  --ink-3: color-mix(in srgb, var(--ink) 66%, var(--sheet));
  --line: color-mix(in srgb, var(--ink) 15%, var(--paper));
  --line-2: color-mix(in srgb, var(--ink) 32%, var(--paper));
  --frontier-2: color-mix(in srgb, var(--frontier) 45%, white);
  --frontier-tint: color-mix(in srgb, var(--frontier) 16%, var(--sheet));
  --signal-tint: color-mix(in srgb, var(--signal) 14%, var(--sheet));
  --gold-tint: color-mix(in srgb, var(--gold) 16%, var(--sheet));
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --row: 84px; --gap: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background-color: var(--paper); background-image: var(--bg-image, none); background-attachment: fixed;
  background-size: var(--bg-size, auto); color: var(--ink);
  font: 16px/1.5 var(--sans); font-variant-numeric: tabular-nums;
}
[hidden] { display: none !important; }
a { color: var(--frontier); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: 30px; letter-spacing: -0.01em; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 2px solid var(--frontier); outline-offset: 2px; }
::selection { background: var(--frontier-tint); }

/* ------------------------------------------------------------ shell: top strip + task bar */
.shell { min-height: 100vh; }
.topbar { background: var(--bar); color: var(--barink); display: grid; grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr); align-items: stretch; min-height: 62px; }
.clock { display: flex; flex-direction: column; justify-content: center; padding: 6px 22px; line-height: 1.15; }
.clock.right { text-align: right; align-items: flex-end; }
.clock .cl { font-size: 12.5px; font-weight: 600; opacity: .75; }
.clock time { font: 600 22px/1.15 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.clock .cd { font-size: 12px; opacity: .65; }
.clock[hidden] { display: flex !important; visibility: hidden; }
.site { display: flex; align-items: center; gap: 12px; color: var(--barink); text-decoration: none; padding: 6px 12px; }
.site img { height: 38px; width: auto; max-width: 120px; object-fit: contain; }
.site .nm { font: 600 26px/1.1 var(--serif); letter-spacing: -0.01em; }
.site small { display: block; font: 400 12.5px var(--sans); opacity: .7; margin-top: 2px; }
.taskbar { position: sticky; top: 0; z-index: 800; display: flex; align-items: stretch; background: var(--sheet); border-bottom: 1px solid var(--line-2); box-shadow: 0 1px 0 var(--line); }
.taskbar nav { display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.taskbar nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 9px 16px 8px; min-width: 74px; color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.taskbar nav a svg, .taskbar nav a img.ico { width: 22px; height: 22px; object-fit: contain; }
.taskbar nav a:hover { background: var(--frontier-tint); color: var(--ink); }
.taskbar nav a[aria-current="page"] { color: var(--frontier); border-bottom-color: var(--frontier); background: var(--frontier-tint); }
.usermenu { position: relative; display: flex; align-items: center; padding: 0 12px; border-left: 1px solid var(--line); }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 6px; font-weight: 600; font-size: 14px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.usermenu .menu { position: absolute; right: 8px; top: 100%; min-width: 180px; background: var(--sheet); border: 1px solid var(--line-2); border-radius: 5px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; z-index: 900; }
.usermenu .menu a, .usermenu .menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; color: var(--ink); text-decoration: none; background: none; border: 0; font: 500 14px var(--sans); cursor: pointer; text-align: left; border-radius: 3px; }
.usermenu .menu a:hover, .usermenu .menu button:hover { background: var(--frontier-tint); }
.usermenu svg { width: 18px; height: 18px; }
.whoami { color: var(--ink); }
.linkbtn { background: none; border: 0; color: var(--frontier); padding: 4px 0; cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.main { padding: 20px 28px 60px; max-width: 1720px; margin: 0 auto; width: 100%; outline: none; }

.pagehead { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.pagehead .lead { color: var(--ink-2); max-width: 62ch; margin: 6px 0 0; }
.meta-note { color: var(--ink-3); font-size: 14px; }
.section { margin-top: 34px; }
.section > header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.section > header h2 { font-size: 19px; }

/* ------------------------------------------------------------ controls */
label { display: block; font-weight: 600; font-size: 14px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--input); border: 1px solid var(--line-2); border-radius: 3px;
  padding: 8px 10px; width: 100%;
}
label > input, label > select, label > textarea { margin-top: 4px; font-weight: 400; }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0 6px 0 0; accent-color: var(--frontier); }
.check { display: inline-flex; align-items: center; font-weight: 500; font-size: 14px; margin-right: 14px; cursor: pointer; }
.btn {
  font: 600 15px/1 var(--sans); border: 1px solid var(--ink); background: transparent; color: var(--ink);
  padding: 10px 16px; border-radius: 3px; cursor: pointer;
}
.btn:hover { background: rgba(20,35,43,.07); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #24404d; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.danger { border-color: var(--signal); color: var(--signal); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-bottom: 8px; }
.toolbar > * { flex: 0 0 auto; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar select { min-width: 130px; }
.form-error { color: var(--signal); min-height: 1.4em; font-size: 14px; margin: 8px 0; }
.empty { color: var(--ink-2); padding: 26px 0; }
.empty strong { color: var(--ink); }
.notice { border-left: 3px solid var(--gold); background: var(--gold-tint); padding: 10px 14px; margin: 0 0 18px; font-size: 15px; }
.notice.err { border-color: var(--signal); background: var(--signal-tint); }

/* ------------------------------------------------------------ tags */
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 12px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 2px; padding: 0 6px; line-height: 18px; background: transparent; }
.tag.border { color: var(--frontier); border-color: var(--frontier); }
.tag.conflict { color: var(--signal); border-color: var(--signal); }
button.tag { cursor: pointer; font-family: inherit; }
button.tag[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .tag { font-size: 13px; line-height: 24px; padding: 0 10px; }

/* ------------------------------------------------------------ news item */
.items { list-style: none; margin: 0; padding: 0; }
.item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item a.title { color: var(--ink); font-weight: 600; text-decoration: none; font-size: 16.5px; line-height: 1.35; }
.item a.title:hover { text-decoration: underline; text-decoration-color: var(--frontier); }
.item .sum { color: var(--ink-2); font-size: 15px; margin: 3px 0 0; max-width: 78ch; }
.item .meta { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: center; font-size: 13.5px; color: var(--ink-3); margin-top: 5px; }
.item .meta .src { color: var(--ink); font-weight: 600; }
.item.compact .title { font-size: 15.5px; }

/* ------------------------------------------------------------ frontier strip */
.frontier { margin-top: 4px; }
.frontier-bar { display: flex; gap: 3px; }
.seg { min-width: 0; border: 1px solid var(--frontier); padding: 8px 10px 9px; position: relative; text-decoration: none; color: var(--ink); display: block;
  background: color-mix(in srgb, var(--frontier) calc(var(--heat, 0) * 1%), var(--sheet)); }
.seg:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.seg .name { font-weight: 700; font-size: 15px; }
.seg .km { font-size: 12.5px; color: var(--ink-2); }
.seg .n { font: 600 30px/1 var(--serif); margin-top: 8px; display: block; }
.seg .n small { font: 500 12px var(--sans); margin-left: 4px; color: var(--ink-2); }
.seg.hot { color: #fff; }
.seg.hot .km, .seg.hot .n small { color: #dbe8f2; }
.frontier-caption { font-size: 13.5px; color: var(--ink-2); margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.frontier-caption b { color: var(--ink); }

/* ------------------------------------------------------------ overview layout */
.split-unused { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.brief { font-family: var(--serif); font-size: 17.5px; line-height: 1.62; max-width: 66ch; }
.brief p { margin: 0 0 .7em; }
h4.bh { font: 700 13.5px/1.3 var(--sans); letter-spacing: .01em; color: var(--frontier); margin: 1.25em 0 .2em; }
h4.bh:first-child { margin-top: 0; }
.brief strong, .turn .a strong { font-family: var(--sans); font-weight: 700; font-size: .92em; }
.brief ul { padding-left: 1.1em; margin: .2em 0 .8em; }
sup.cite, a.cite { font: 600 11px/1 var(--sans); color: var(--frontier); text-decoration: none; vertical-align: super; padding: 0 1px; }
a.cite:hover { text-decoration: underline; }
.brief-foot { font: 13.5px var(--sans); color: var(--ink-3); margin-top: 10px; }

/* ------------------------------------------------------------ map */
.mapbar { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.mapbar fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.mapbar legend { float: left; font-weight: 700; font-size: 13.5px; margin-right: 12px; padding: 0; }
.mapbar select { width: auto; padding: 5px 8px; }
.map { height: 560px; border: 1px solid var(--line-2); background: #dfe5dc; }
.map.tall { height: calc(100vh - 230px); min-height: 420px; }
.map-legend { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.leaflet-popup-content { font: 14px/1.4 var(--sans); margin: 10px 12px; }
.leaflet-popup-content .p-title { font-weight: 700; display: block; margin-bottom: 4px; }
.leaflet-popup-content .p-meta { color: var(--ink-3); font-size: 12.5px; }
.leaflet-popup-content a { color: var(--frontier); }

/* ------------------------------------------------------------ ask */
.ask-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; align-items: start; }
.chat { min-height: 220px; }
.turn { padding: 16px 0 22px; border-bottom: 1px solid var(--line); }
.turn .q { font-weight: 700; font-size: 16.5px; margin-bottom: 10px; }
.turn .a { font-family: var(--serif); font-size: 17.5px; line-height: 1.62; max-width: 70ch; }
.turn .a p { margin: 0 0 .7em; }
.turn .a ul { margin: .3em 0 .8em; padding-left: 1.2em; }
.turn.pending .a { color: var(--ink-3); font-style: italic; }
.srcs { margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; }
.srcs li { padding: 5px 0; border-top: 1px dotted var(--line-2); display: grid; grid-template-columns: 32px 1fr; gap: 6px; }
.srcs li.flash { background: var(--frontier-tint); }
.srcs .n { font-weight: 700; color: var(--frontier); }
.srcs .kind { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.srcs .snip { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.askform { position: sticky; bottom: 0; background: var(--paper); padding: 14px 0 6px; border-top: 1px solid var(--line-2); margin-top: 14px; }
.askform textarea { min-height: 64px; }
.askform .row { display: flex; gap: 12px; align-items: end; }
.askform .row .btn { flex: 0 0 auto; }
.scope { font-size: 14px; }
.scope h3 { font: 700 14px var(--sans); margin: 0 0 8px; }
.scope .check { display: flex; margin: 0 0 6px; }
.scope select[multiple] { height: 130px; margin-top: 6px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.suggest button { font: 500 14px var(--sans); background: transparent; border: 1px solid var(--line-2); border-radius: 3px; padding: 6px 10px; cursor: pointer; color: var(--ink); text-align: left; }
.suggest button:hover { border-color: var(--ink); }

/* ------------------------------------------------------------ tables (library, admin) */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 13px; color: var(--ink-2); font-weight: 700; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl .num { text-align: right; }
.tbl .ok { color: var(--moss); font-weight: 600; }
.tbl .bad { color: var(--signal); font-weight: 600; }
.tbl .url { color: var(--ink-3); font-size: 12.5px; word-break: break-all; max-width: 380px; }
.scroll-x { overflow-x: auto; }
.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; align-items: start; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.drop { border: 1.5px dashed var(--line-2); padding: 20px; background: var(--sheet); }

/* ------------------------------------------------------------ ORBAT */
.orbat { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 36px; align-items: start; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.tabs button { font: 600 15px var(--sans); background: transparent; border: 0; padding: 10px 16px; cursor: pointer; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--frontier); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 13px; padding-left: 14px; border-left: 1px solid var(--line-2); }
.tree li { margin: 0; }
.tree details > summary { list-style: none; cursor: pointer; }
.tree details > summary::-webkit-details-marker { display: none; }
.node { display: grid; grid-template-columns: 18px 1fr auto; gap: 4px 8px; align-items: baseline; padding: 6px 8px 6px 2px; border-radius: 3px; cursor: pointer; }
.node:hover { background: rgba(20,35,43,.05); }
.node.sel { background: var(--frontier-tint); }
.node .chev { color: var(--ink-3); font-size: 11px; transition: transform .12s; text-align: center; }
details[open] > summary .chev { transform: rotate(90deg); }
.node .nm { font-weight: 600; }
.node .rl { grid-column: 2 / 4; color: var(--ink-2); font-size: 13.5px; margin-top: -2px; }
.status { font-size: 12px; font-weight: 600; padding: 0 6px; line-height: 18px; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 2px; white-space: nowrap; }
.status.contested { color: var(--gold); border-color: var(--gold); background: var(--gold-tint); }
.status.verify, .status.reported, .status.assessment { border-style: dashed; }
.status.ceasefire { color: var(--frontier); border-color: var(--frontier); }
.status.active, .status.in-control { color: var(--signal); border-color: var(--signal); }
.detail { position: sticky; top: 22px; border-top: 3px solid var(--ink); padding-top: 14px; }
.detail h3 { font-size: 20px; }
.detail .role { color: var(--ink-2); margin: 4px 0 12px; }
.detail .note { font-size: 15.5px; line-height: 1.55; }
.detail dl { margin: 14px 0 0; font-size: 14px; }
.detail dt { font-weight: 700; color: var(--ink-2); font-size: 12.5px; margin-top: 10px; }
.detail dd { margin: 2px 0 0; }
mark { background: #f4e08a; color: #14232b; }

/* ------------------------------------------------------------ diplomacy */
.dip { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.dip-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.dip-list button { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 11px 10px 11px 12px; cursor: pointer; font: inherit; border-left: 4px solid transparent; }
.dip-list button:hover { background: rgba(20,35,43,.05); }
.dip-list button[aria-current="true"] { background: var(--sheet); border-left-color: var(--ink); }
.dip-list .cn { font-weight: 700; display: block; }
.dip-list .ps { font-size: 13px; color: var(--ink-2); }
.dip-list .stance-backer { border-left-color: var(--gold) !important; }
.dip-list .stance-engaging { border-left-color: var(--frontier) !important; }
.dip-list .stance-strained, .dip-list .stance-sanctioning { border-left-color: var(--signal) !important; }
.dip-main h2 { font-size: 30px; }
.dip-main .posture { color: var(--frontier); font-weight: 700; margin: 4px 0 14px; }
.dip-main .sum { font-family: var(--serif); font-size: 18px; line-height: 1.6; max-width: 68ch; }
.dip-main h3 { margin: 26px 0 8px; font: 700 14px var(--sans); color: var(--ink-2); }
.dip-main ul.pts { margin: 0; padding-left: 1.15em; max-width: 74ch; }
.dip-main ul.pts li { margin: 0 0 8px; }
.timeline { list-style: none; margin: 0; padding: 0; max-width: 74ch; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.timeline .d { font-weight: 700; color: var(--frontier); font-size: 14px; }
.srclist { font-size: 14px; padding-left: 1.1em; margin: 0; }

/* ------------------------------------------------------------ misc */
.toast { position: fixed; right: 18px; bottom: 18px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 3px; max-width: 380px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s; z-index: 9999; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--signal); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--frontier); border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes sp { to { transform: rotate(360deg); } }
.skeleton { color: var(--ink-3); padding: 20px 0; }
pre.json { width: 100%; min-height: 380px; font: 13px/1.45 ui-monospace, Menlo, Consolas, monospace; }

/* ------------------------------------------------------------ login */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--bar); padding: 20px; }
.login-sheet { background: var(--sheet); width: min(420px, 100%); padding: 34px 32px 30px; border-top: 4px solid var(--frontier-2); }
.login-sheet h1 { font-size: 34px; }
.login-sub { color: var(--ink-2); margin: 8px 0 22px; }
.login-sheet label { margin-bottom: 14px; }
.login-sheet .btn { width: 100%; padding: 12px; }

/* ------------------------------------------------------------ map crossing marker */
.xing-wrap { background: transparent; border: 0; }
.xing { display: block; width: 12px; height: 12px; margin: 3px; background: var(--frontier); border: 2px solid #fff; transform: rotate(45deg); box-shadow: 0 0 0 1px var(--frontier); }
.leaflet-tooltip { font: 600 12.5px var(--sans); color: var(--ink); }

/* ------------------------------------------------------------ late polish */
.srcs, .srcs * { font-family: var(--sans); }
.turn:last-child { border-bottom: 0; }

/* ============================================================ configurable pages: blocks */
.pg { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: var(--row); grid-auto-flow: row dense; gap: var(--gap); }
.blk { grid-column: span var(--c, 3); grid-row: span var(--r, 4); min-width: 0; min-height: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 5px; display: flex; flex-direction: column; overflow: hidden; }
.blk > header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 14px 8px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.blk > header h2 { font-size: 17px; }
.blk > header a { font-size: 13px; font-weight: 600; white-space: nowrap; }
.blk .bd { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; }
.blk .bd.flush { padding: 0; overflow: hidden; }
.blk.bare { background: transparent; border: 0; overflow: visible; }
.blk .empty { padding: 14px 0; }
.mapfill { height: 100%; min-height: 240px; }
.mapfill .leaflet-container { height: 100%; }

/* carousel */
.car { height: 100%; display: flex; flex-direction: column; }
.car .track { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: pan-y; }
.slide { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .35s; }
.slide.on { opacity: 1; visibility: visible; }
.slide .pic { flex: 0 0 44%; min-height: 0; position: relative; overflow: hidden; background: var(--line); display: block; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide .txt { flex: 1; min-height: 0; padding: 11px 14px 6px; overflow: hidden; display: flex; flex-direction: column; }
.slide h3, .card h3 { font: 600 17px/1.28 var(--serif); margin: 0; }
.slide h3 a, .card h3 a { color: var(--ink); text-decoration: none; }
.slide h3 a:hover, .card h3 a:hover { text-decoration: underline; text-decoration-color: var(--frontier); }
.slide h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide .sum { color: var(--ink-2); font-size: 14px; line-height: 1.45; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.slide .meta, .card .meta { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-top: auto; padding-top: 6px; }
.meta .src { color: var(--ink); font-weight: 600; }
.car .ctl { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px 6px 12px; border-top: 1px solid var(--line); flex: 0 0 auto; }
.car .dots { display: flex; gap: 5px; flex-wrap: wrap; }
.car .dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--line-2); padding: 0; cursor: pointer; }
.car .dots button[aria-current="true"] { background: var(--frontier); width: 18px; border-radius: 4px; }
.car .arrows { display: flex; gap: 2px; }
.car .arrows button { background: none; border: 0; padding: 4px 8px; cursor: pointer; color: var(--ink-2); font-size: 20px; line-height: 1; border-radius: 3px; }
.car .arrows button:hover { background: var(--frontier-tint); color: var(--ink); }
/* placeholder picture when an article has no image */
.pic.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--k, var(--frontier)) 32%, var(--sheet)), color-mix(in srgb, var(--k, var(--frontier)) 10%, var(--sheet))); color: color-mix(in srgb, var(--k, var(--frontier)) 70%, var(--ink)); }
.pic.ph.k-conflict { --k: var(--signal); } .pic.ph.k-border { --k: var(--frontier); } .pic.ph.k-other { --k: var(--ink-2); }
.pic.ph .phl { font: 600 44px/1 var(--serif); } .pic.ph .phs { font: 600 12.5px var(--sans); opacity: .8; max-width: 90%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* article cards (grids on Frontier / People / Groups / Search) */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 16 / 9; display: block; position: relative; overflow: hidden; background: var(--line); }
.card .ct { padding: 10px 12px 10px; display: flex; flex-direction: column; flex: 1; }
.card .sum { color: var(--ink-2); font-size: 14px; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* frontier block */
.frs { display: flex; gap: 3px; margin-bottom: 10px; }
.frs a { min-width: 0; height: 26px; border: 1px solid var(--frontier); background: color-mix(in srgb, var(--frontier) calc(var(--heat, 0) * 1%), var(--sheet)); }
.frrow { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 7px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.frrow:first-of-type { border-top: 0; }
.frrow:hover .frn { text-decoration: underline; }
.frrow .frn { font-weight: 700; } .frrow .frk { color: var(--ink-3); font-size: 12.5px; font-weight: 400; margin-left: 6px; }
.frrow .frc { font: 600 20px/1 var(--serif); color: var(--frontier); text-align: right; }
.frrow .frl { grid-column: 1 / 3; font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* people / groups rows */
.prow { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: start; }
.prow:first-child { border-top: 0; }
.prow:hover .pn { text-decoration: underline; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--frontier-tint); color: var(--frontier); display: grid; place-items: center; font: 600 15px var(--sans); border: 1px solid color-mix(in srgb, var(--frontier) 30%, var(--sheet)); flex: none; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; }
.prow .pn { font-weight: 700; display: block; } .prow .pr { color: var(--ink-2); font-size: 13.5px; display: block; }
.prow .pl { color: var(--ink-3); font-size: 12.5px; display: block; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* search block */
.sbox { display: flex; gap: 8px; align-items: center; height: 100%; padding: 0; }
.sbox input { flex: 1; height: 100%; font-size: 16px; padding: 0 14px; border-radius: 5px; }
.sbox button { height: 100%; border-radius: 5px; padding: 0 16px; }
.blk.searchblk { background: transparent; border: 0; overflow: visible; }

/* social placeholder */
.social { color: var(--ink-2); font-size: 14.5px; }
.social ul { padding-left: 1.1em; margin: 8px 0; }
.status.off { border-style: dashed; }

/* ============================================================ pages: frontier / directories / search */
.fr-tabs { margin-bottom: 18px; }
.fr-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.facts h3, .dip-main h3 { margin: 22px 0 8px; font: 700 14px var(--sans); color: var(--ink-2); }
.facts ul { padding-left: 1.15em; margin: 0; } .facts li { margin: 0 0 7px; }
.chipline { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.hero-strip { margin-bottom: 26px; }
.dir-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.leader { padding: 8px 0; border-top: 1px solid var(--line); } .leader:first-child { border-top: 0; }
.leader b { display: block; } .leader span { color: var(--ink-2); font-size: 14px; } .leader small { display: block; color: var(--gold); font-size: 12.5px; }
.res-group { margin-top: 26px; } .res-group > h2 { font-size: 18px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.res { padding: 9px 0; border-bottom: 1px solid var(--line); } .res a { font-weight: 700; color: var(--ink); text-decoration: none; } .res a:hover { text-decoration: underline; }
.res .rs { color: var(--ink-2); font-size: 14px; margin: 2px 0 0; } .res .rm { color: var(--ink-3); font-size: 12.5px; }
.bigsearch { display: flex; gap: 8px; max-width: 720px; margin-bottom: 8px; } .bigsearch input { font-size: 17px; padding: 11px 14px; }

/* ============================================================ customise (admin) */
.cz-bar { position: sticky; top: 74px; z-index: 700; background: var(--sheet); border: 1px solid var(--line-2); border-radius: 5px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.cz-bar .grow { flex: 1; color: var(--ink-2); font-size: 14px; }
.cz-row { display: grid; grid-template-columns: 54px minmax(110px, 1fr) 110px minmax(130px, 1.2fr) 70px auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.cz-row .ic { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 4px; color: var(--ink); }
.cz-row .ic svg, .cz-row .ic img { width: 20px; height: 20px; }
.cz-btns { display: flex; gap: 4px; }
.cz-btns button { padding: 5px 8px; border: 1px solid var(--line-2); background: transparent; border-radius: 3px; cursor: pointer; color: var(--ink); font: 600 13px var(--sans); }
.cz-btns button:hover { background: var(--frontier-tint); }
.cz-block { border: 1px solid var(--line); border-radius: 5px; background: var(--sheet); margin-bottom: 8px; }
.cz-block > summary { list-style: none; cursor: pointer; padding: 9px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 10px; align-items: center; }
.cz-block > summary::-webkit-details-marker { display: none; }
.cz-block .bt { font-weight: 700; } .cz-block .bt small { color: var(--ink-3); font-weight: 500; margin-left: 8px; }
.cz-block .num { width: 62px; padding: 5px 6px; }
.cz-block .cfg { padding: 4px 14px 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.cz-block .cfg .wide { grid-column: 1 / -1; }
.cz-mini { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 12px; grid-auto-flow: row dense; gap: 4px; padding: 10px; background: var(--paper); border: 1px dashed var(--line-2); border-radius: 5px; margin-bottom: 16px; }
.cz-mini div { background: var(--frontier-tint); border: 1px solid color-mix(in srgb, var(--frontier) 40%, var(--sheet)); border-radius: 3px; font-size: 10.5px; padding: 2px 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.cz-mini div.off { opacity: .35; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.swatches label { display: flex; align-items: center; gap: 8px; } .swatches input[type=color] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line-2); background: none; }
.cz-tabs { margin-bottom: 18px; }


/* social feeds */
.posts { display: grid; gap: 0; }
.post { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; }
.post.nopic { grid-template-columns: minmax(0, 1fr); }
.post .pic { width: 74px; height: 74px; border-radius: 4px; overflow: hidden; display: block; background: var(--line); }
.post .pic.ph .phl { font-size: 26px; } .post .pic.ph .phs { display: none; }
.post .ptxt { color: var(--ink); text-decoration: none; font-size: 14.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.post .ptxt:hover { text-decoration: underline; }
.post .meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.posts.youtube { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.posts.youtube .post { display: flex; flex-direction: column; gap: 0; padding: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--sheet); }
.posts.youtube .post .pic { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0; }
.posts.youtube .pbody { padding: 8px 10px 10px; }
.posts.youtube .ptxt { font-weight: 600; -webkit-line-clamp: 2; }
.warn { color: var(--signal); }


/* theme picker (Customise) and personal appearance (user menu) */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 4px; }
.presets-h { font: 700 13px var(--sans); color: var(--ink-2); margin: 14px 0 0; }
.preset { border: 2px solid var(--line-2); background: var(--sheet); border-radius: 7px; padding: 8px; text-align: left; cursor: pointer; color: var(--ink); font: 600 13.5px var(--sans); }
.preset:hover { border-color: var(--ink-3); }
.preset[aria-pressed="true"] { border-color: var(--frontier); box-shadow: 0 0 0 1px var(--frontier); }
.pv { display: block; height: 70px; border-radius: 4px; position: relative; overflow: hidden; border: 1px solid rgba(128, 128, 128, .35); margin-bottom: 7px; }
.pv .pvbar { position: absolute; left: 0; right: 0; top: 0; height: 15px; }
.pv .pvblk { position: absolute; left: 9px; right: 9px; top: 24px; bottom: 8px; border-radius: 3px; border: 1px solid; padding: 6px 7px; display: flex; flex-direction: column; gap: 5px; }
.pv .pvblk i { display: block; height: 5px; border-radius: 2px; } .pv .pvblk i:first-child { width: 55%; } .pv .pvblk i:last-child { width: 80%; opacity: .7; }
.usermenu .menu .pref { display: grid; gap: 4px; padding: 8px 10px 6px; border-top: 1px solid var(--line); margin-top: 4px; font-size: 12.5px; color: var(--ink-2); }
.usermenu .menu .pref select { width: 100%; padding: 6px; }


/* ============================================================ v3: centred brand, flags, flowchart, live TV, organised sections */
.site > span { display: block; text-align: center; }
.flag { display: block; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.fl { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 8px; }
.pill { display: inline-block; font: 600 11.5px var(--sans); padding: 2px 8px; border-radius: 10px; background: var(--frontier-tint); color: var(--frontier); border: 1px solid color-mix(in srgb, var(--frontier) 30%, var(--sheet)); }
.pill.warn { background: var(--gold-tint); color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, var(--sheet)); }
.pill.ok { background: color-mix(in srgb, var(--moss) 18%, var(--sheet)); color: var(--moss); border-color: color-mix(in srgb, var(--moss) 35%, var(--sheet)); }
.chip.dir { display: inline-block; font: 600 12px var(--sans); padding: 2px 9px; border-radius: 4px; background: var(--frontier-tint); color: var(--frontier); }
.chip.dir.inbound { background: var(--gold-tint); color: var(--gold); } .chip.dir.unclear { background: var(--line); color: var(--ink-2); }
.bh { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 2px 0 6px; }
.bh:not(:first-child) { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.vrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.vrow:first-of-type { border-top: 0; } .vrow:not(:has(.vpic)) { grid-template-columns: minmax(0, 1fr); }
.vpic { width: 92px; height: 64px; border-radius: 4px; overflow: hidden; display: block; background: var(--line); }
.vt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.vh { color: var(--ink); font: 600 15px/1.3 var(--serif); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vh:hover { text-decoration: underline; }
.vb .meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; } .vb .meta .src { color: var(--ink); font-weight: 600; }
.rec { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rec.hi { border-left: 3px solid var(--frontier); padding-left: 9px; }
.rd { font: 600 12.5px var(--sans); color: var(--ink-3); padding-top: 2px; }
.rs { color: var(--ink-2); font-size: 14px; margin: 3px 0; }
.rec .pts, .mrow .pts { margin: 6px 0; padding-left: 1.1em; font-size: 14px; } .rec .pts li, .mrow .pts li { margin: 0 0 3px; }
.srcs2 { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; } .srcs2 a { color: var(--frontier); }

/* live TV */
.tvwrap { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 26px; }
.tvframe { aspect-ratio: 16 / 9; background: #06090b; border-radius: 6px; overflow: hidden; display: grid; place-items: center; color: #cfd8dc; text-align: center; padding: 20px; }
.tvframe iframe { width: 100%; height: 100%; border: 0; display: block; }
.tvtabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tvtabs button { border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink); border-radius: 18px; padding: 6px 14px; font: 600 13.5px var(--sans); cursor: pointer; }
.tvtabs button[aria-pressed="true"] { background: var(--frontier); border-color: var(--frontier); color: var(--sheet); }
.tvcard { position: relative; text-align: left; padding: 0; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.tvcard .pic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(0, 0, 0, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 26px no-repeat; transition: transform .2s; }
.tvcard:hover .pic::after { transform: scale(1.12); }
.live-badge { position: absolute; top: 8px; left: 8px; z-index: 2; background: #d81b1b; color: #fff; font: 700 11px var(--sans); letter-spacing: .06em; padding: 2px 8px; border-radius: 3px; }

/* foreign relations: flag wall */
.wall { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 24px auto 12px; max-width: 760px; }
.fcard { position: relative; width: 158px; padding: 16px 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--sheet); cursor: pointer; text-align: center; color: var(--ink);
  font: 700 15px var(--sans); animation: pop .55s cubic-bezier(.2, .8, .3, 1.15) both; animation-delay: calc(var(--i) * 70ms); transition: transform .25s, box-shadow .25s, border-color .25s; }
.fcard .flag { margin: 0 auto 10px; transition: transform .35s; transform-origin: 50% 100%; }
.fcard:hover { transform: translateY(-6px); box-shadow: 0 12px 26px rgba(0, 0, 0, .2); border-color: var(--frontier-2); }
.fcard:hover .flag { transform: rotate(-3deg) scale(1.1); }
.fcard small { display: block; font: 500 12px var(--sans); color: var(--ink-3); margin-top: 3px; }
.fcard[aria-pressed="true"] { border-color: var(--frontier); box-shadow: 0 0 0 3px var(--frontier-tint), 0 14px 28px rgba(0, 0, 0, .22); transform: translateY(-4px); }
.fcard[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: -13px; margin-left: -10px; border: 10px solid transparent; border-top-color: var(--frontier); border-bottom: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.enter { animation: rise .45s both; }
.cdetail { max-width: 980px; margin: 22px auto 0; }
.chead { display: flex; align-items: center; justify-content: center; gap: 16px; text-align: center; flex-wrap: wrap; }
.chead h2 { font-size: 34px; }
.dsec { border-top: 1px solid var(--line-2); padding-top: 14px; margin-top: 24px; }
.dsec > h3 { font: 700 13px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.dsec > h3 .n { font-weight: 600; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.mrow { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.mrow:first-of-type { border-top: 0; }
.mrow .md { font: 600 13px var(--sans); color: var(--frontier); }
.mrow .mt { font: 600 17px/1.3 var(--serif); margin: 0 0 3px; }
.mrow .mw { color: var(--ink-2); font-size: 13.5px; margin: 0 0 4px; }
.mrow p { margin: 4px 0; max-width: 72ch; }
.kv { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.kv dt { font: 600 13.5px var(--sans); color: var(--ink-2); } .kv dd { margin: 0; }
.callout { background: var(--frontier-tint); border-left: 4px solid var(--frontier); padding: 10px 14px; border-radius: 0 5px 5px 0; max-width: 72ch; }
.lh { font: 700 11.5px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 16px 0 4px; padding-left: 4px; } .lh:first-child { margin-top: 0; }
.dsum { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ORBAT flowchart */
.fc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.fc-tools input[type=search] { max-width: 260px; }
.fc-tools .zb { min-width: 34px; }
.fc-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-left: auto; }
.fc-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.fc-scroll { overflow: auto; border: 1px solid var(--line); background: var(--sheet); border-radius: 6px; padding: 22px; max-height: 72vh; }
.fc-inner { position: relative; transform-origin: 0 0; }
.fc-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.fc-svg path { fill: none; stroke: var(--line-2); stroke-width: 1.8; }
.fcn { position: absolute; box-sizing: border-box; padding: 8px 10px 10px; border: 1px solid var(--line-2); border-top: 5px solid var(--frontier); border-radius: 6px; background: var(--sheet);
  text-align: left; cursor: pointer; color: var(--ink); font-family: var(--sans); transition: box-shadow .2s, opacity .2s, transform .2s; overflow: visible; }
.fcn:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .18); transform: translateY(-2px); }
.fcn b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.22; }
.fcn span.r { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.25; }
.fcn.st-warn { border-top-color: var(--gold); } .fcn.st-off { border-top-color: var(--ink-3); opacity: .8; } .fcn.st-alarm { border-top-color: var(--signal); }
.fcn[aria-pressed="true"] { outline: 2px solid var(--frontier); outline-offset: 1px; }
.fcn.hit { box-shadow: 0 0 0 4px #f4e08a; } .fcn.dim { opacity: .22; }
.fct { position: absolute; bottom: -12px; left: 50%; margin-left: -13px; width: 26px; height: 22px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink); font: 700 12px var(--sans); cursor: pointer; padding: 0; z-index: 3; }
.fct:hover { background: var(--frontier-tint); }
.fc-detail { margin-top: 16px; padding: 14px 18px; border: 1px solid var(--line); border-left: 5px solid var(--frontier); background: var(--sheet); border-radius: 6px; }
.fc-detail h3 { font-size: 20px; margin: 0 0 4px; }

/* keys and services */
.svcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.svc { border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); padding: 14px 16px; } .svc h3 { font-size: 18px; margin: 0 0 4px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.svc dl { margin: 8px 0 0; display: grid; grid-template-columns: 84px 1fr; gap: 4px 12px; font-size: 14px; } .svc dt { color: var(--ink-3); font-weight: 600; } .svc dd { margin: 0; overflow-wrap: anywhere; }
.svc code { background: var(--line); padding: 1px 6px; border-radius: 3px; font-size: 12.5px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .pg { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .blk { grid-column: span 3; }
  .blk[data-w="wide"] { grid-column: span 6; }
  .ask-wrap, .orbat { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .detail { position: static; }
  .fr-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr 1fr; grid-template-areas: "site site" "l r"; }
  .site { grid-area: site; justify-content: center; }
  .topbar .clock.left { grid-area: l; padding: 4px 14px 8px; } .topbar .clock.right { grid-area: r; padding: 4px 14px 8px; }
  .clock time { font-size: 18px; }
  .site .nm { font-size: 22px; }
  .main { padding: 14px 12px 48px; }
  h1 { font-size: 26px; }
  .pg { display: flex; flex-direction: column; }
  .blk { min-height: 0; }
  .blk.h-car { height: 470px; } .blk.h-map { height: 420px; } .blk .bd.scrolly { max-height: 460px; }
  .taskbar nav a { min-width: 66px; padding: 8px 10px 7px; }
  .usermenu summary small { display: none; }
  .dip { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .map.tall { height: 62vh; }
  .timeline li { grid-template-columns: 78px 1fr; }
  .cardgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 1180px) { .tvwrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .mrow, .rec { grid-template-columns: minmax(0, 1fr); gap: 4px; } .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; }
  .fcard { width: calc(50% - 10px); } .chead h2 { font-size: 26px; } .fc-legend { margin-left: 0; }
}
