:root {
  --brand: #4b2a7b; --brand-2: #6a3fa8; --brand-soft: #efe9f7;
  --aj: #2f7d4f; --aj-soft: #e5f3ea;
  --bg: #f6f5f9; --card: #fff; --ink: #1f1b2a; --muted: #6b6578; --line: #e3dfea;
  --warn: #b26a00; --warn-soft: #fff4e0; --bad: #c0392b; --ok: #2f7d4f;
  --rS: #d62828; --rH: #f58c1e; --rM: #fad646; --rL: #5cb85c;
  --radius: 12px; --shadow: 0 1px 2px rgba(30,20,50,.06), 0 4px 16px rgba(30,20,50,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand-2); }
h1 { font-size: 1.7rem; margin: .2em 0 .3em; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 1.2em 0 .6em; }
.card h2:first-child, .card > h2 { margin-top: 0; }
h3 { font-size: 1rem; margin: .8em 0 .4em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .pre { white-space: pre-line; }
.boot { display: grid; place-items: center; height: 100vh; font-size: 48px; color: var(--brand); }

/* header */
.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.top-inner { max-width: 1280px; margin: 0 auto; padding: 10px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; display: flex; gap: 8px; align-items: center; }
.fleur { font-size: 1.4rem; } .fleur.big { font-size: 3rem; line-height: 1; }
.who { display: flex; gap: 10px; align-items: center; }
.who-name { color: #fff; text-decoration: none; font-weight: 500; display: flex; gap: 6px; align-items: center; }
.tabs { max-width: 1280px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tab { color: #e4dcf2; text-decoration: none; padding: 10px 14px 11px; border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 500; }
.tab:hover { color: #fff; } .tab.active { color: #fff; border-color: #f5c542; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 16px 40px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px 16px 30px; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 9px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--brand-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); border-color: #efc9c4; } .btn.danger:hover { background: #fdf0ee; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn.small { padding: 5px 10px; font-size: .85rem; }
.btn.wide { width: 100%; padding: 11px; }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .9rem; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { background: #f3eef9; color: var(--bad); }
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
input:disabled, select:disabled, textarea:disabled { background: #faf9fc; color: var(--ink); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--aj); flex: none; }
textarea { resize: vertical; }
.fld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.lbl { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.hint { color: var(--muted); font-size: .82rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.err { color: var(--bad); min-height: 1.2em; margin: 4px 0 10px; font-size: .9rem; }
.inline { display: flex; gap: 8px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.error { border-color: #efc9c4; color: var(--bad); }
.card.note { background: var(--brand-soft); border-color: #dcd0ee; box-shadow: none; }
.card.note p { margin: 0 0 .4em; } .card.note ul { margin: .3em 0 0; }
.card.empty { text-align: center; padding: 34px 18px; }
.callout { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, #fff, var(--brand-soft)); }
.callout h2 { margin: 0 0 4px; } .callout p { margin: 0; }
.callout.warn { background: var(--warn-soft); border-color: #f2d7a6; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.hero { background: linear-gradient(120deg, var(--brand), #7b4fb9); color: #fff; border-radius: var(--radius); padding: 22px 22px 18px; margin-bottom: 18px; }
.hero p { margin: 0; opacity: .92; max-width: 60ch; }
.tile { text-decoration: none; color: inherit; display: block; transition: transform .12s, box-shadow .12s; border-top: 4px solid var(--brand); }
.tile.aj { border-top-color: var(--aj); }
.tile:hover, .pcard:hover, .tcard:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,20,50,.1); }
.tile-ico { font-size: 2rem; } .tile h2 { margin: .3em 0 .2em; } .tile p { color: var(--muted); margin: 0 0 .8em; }
.link { color: var(--brand-2); font-weight: 600; }
.pcard { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; transition: transform .12s; margin: 0; }
.pcard h3 { margin: 2px 0 0; font-size: 1.05rem; }
.pcard-top { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-prog { display: flex; align-items: center; gap: 8px; }
.tcard { text-decoration: none; color: inherit; display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.tcard h3 { margin: 0 0 2px; } .tcard p { margin: 0; }
.tc-ico { font-size: 1.8rem; line-height: 1; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; }
.sec-head h2 { margin: 0; } .sec-head.tight { margin: 0 0 10px; }
.page-head p { margin-top: 0; }
.subnav { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
.subnav a { padding: 7px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); font-weight: 500; }
.subnav a.active { background: var(--aj); color: #fff; border-color: var(--aj); }
.crumbs { margin-bottom: 6px; } .crumbs a { text-decoration: none; font-weight: 500; }

.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eee9f5; color: var(--brand); white-space: nowrap; vertical-align: middle; }
.pill.aj { background: var(--aj-soft); color: var(--aj); } .pill.act { background: var(--brand-soft); color: var(--brand); }
.pill.admin { background: #f5c542; color: #3b2a00; }
.pill.st-draft { background: #eee; color: #555; } .pill.st-ready { background: var(--warn-soft); color: var(--warn); } .pill.st-approved { background: var(--aj-soft); color: var(--aj); }
.progress { height: 8px; background: #ebe7f1; border-radius: 99px; overflow: hidden; flex: 1; min-width: 80px; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--aj), #4fb07a); border-radius: 99px; transition: width .3s; }
.prog-wrap, .mini-prog { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.banner { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.banner.warn { background: var(--warn-soft); color: #7a4a00; border: 1px solid #f2d7a6; }
.banner.ok { background: var(--aj-soft); color: #1e5a37; border: 1px solid #c4e3cf; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
ul.plain li:last-child { border: 0; }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; max-width: 980px; margin: 0 auto; padding: 24px 16px; }
.auth-brand { color: var(--brand); } .auth-brand h1 { font-size: 2.1rem; } .auth-brand p { color: var(--muted); font-size: 1.05rem; }
.auth-card { padding: 26px; }

/* guide */
.phase h3 { color: var(--aj); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.guide-list li { margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid #cfe6d7; background: var(--aj-soft); color: #1e5a37; text-decoration: none; margin: 3px 4px 0 0; cursor: pointer; font-family: inherit; }
.chip.add { background: #fff; border-style: dashed; color: var(--aj); }
.files { list-style: none; padding: 0; margin: 0; } .files li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line); }
.files li:last-child { border: 0; } .files a { font-weight: 500; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.ficon { font-size: .62rem; font-weight: 800; padding: 3px 5px; border-radius: 4px; background: #666; color: #fff; }
.f-docx, .f-doc { background: #2b579a; } .f-xlsx, .f-xls { background: #217346; } .f-pdf { background: #c0392b; }

/* project */
.proj-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cl-item { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.cl-item:last-child { border: 0; }
.cl-main { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.cl-item.done .cl-main span { color: var(--muted); text-decoration: line-through; }
.cl-extra { padding-left: 28px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cl-note { border: 0; border-bottom: 1px solid transparent; border-radius: 0; padding: 2px 0; font-size: .85rem; color: var(--muted); background: transparent; flex: 1 1 100%; }
.cl-note:hover { border-bottom-color: var(--line); } .cl-note:focus { outline: 0; border-bottom-color: var(--brand-2); color: var(--ink); }
.doclist { list-style: none; padding: 0; margin: 0 0 12px; }
.doclist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.doclist a { text-decoration: none; color: var(--ink); font-weight: 500; display: flex; gap: 8px; align-items: center; }
.doclist a:hover { color: var(--brand-2); }
.dmeta { display: flex; gap: 6px; align-items: center; }

/* doc editor */
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.doc-head h1 { margin: 4px 0 2px; } .doc-head p { margin: 0; }
.doc-head.sticky { position: sticky; top: 92px; z-index: 10; background: rgba(246,245,249,.95); backdrop-filter: blur(6px); padding: 10px 0; border-bottom: 1px solid var(--line); }
.dh-left { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; min-width: 0; }
.dh-ico { font-size: 1.6rem; }
.title-in { font-size: 1.25rem; font-weight: 700; border-color: transparent; background: transparent; padding: 4px 8px; max-width: 520px; }
.title-in:hover { border-color: var(--line); background: #fff; }
.save-state { font-size: .8rem; color: var(--muted); white-space: nowrap; } .save-state.ok { color: var(--ok); } .save-state.bad { color: var(--bad); font-weight: 600; }
.doc-actions, .status-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.side { position: sticky; top: 160px; }
.form-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; margin-bottom: 16px; box-shadow: var(--shadow); }
.form-sec > h2 { margin: 0 0 12px; color: var(--brand); font-size: 1.05rem; border-bottom: 2px solid var(--brand-soft); padding-bottom: 6px; }
.form-sec.notes { background: #fbfaf7; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }
.form-grid > .fld.wide, .form-grid > .tbl-block, .form-grid > .repeat { grid-column: 1 / -1; }
.computed { display: block; padding: 8px 10px; background: var(--aj-soft); border-radius: 8px; font-weight: 600; min-height: 38px; }
.cmt-btn { border: 0; background: transparent; cursor: pointer; opacity: .35; font-size: .8rem; padding: 0 2px; }
.fld:hover .cmt-btn { opacity: 1; }
.tbl-block { margin-bottom: 14px; }
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.grid-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .88rem; }
.grid-tbl.wide { max-width: none; }
.grid-tbl th { background: var(--brand); color: #fff; font-weight: 600; font-size: .78rem; text-align: left; padding: 7px 6px; position: sticky; top: 0; }
.grid-tbl td { border-top: 1px solid var(--line); padding: 3px; vertical-align: top; }
.grid-tbl td + td { border-left: 1px solid #f0edf4; }
.grid-tbl input, .grid-tbl select, .grid-tbl textarea { border-color: transparent; padding: 5px 6px; border-radius: 6px; font-size: .88rem; background: transparent; }
.grid-tbl input:hover, .grid-tbl select:hover, .grid-tbl textarea:hover { background: #faf8fd; }
.grid-tbl textarea { min-height: 34px; }
.grid-tbl tfoot td { background: #f7f5fa; font-weight: 700; padding: 7px 6px; font-size: .85rem; }
.grid-tbl td.num { text-align: right; padding: 8px 6px; color: #333; }
.grid-tbl td.idx { text-align: center; color: var(--muted); }
.grid-tbl td.center { text-align: center; vertical-align: middle; }
.rating { text-align: center; font-weight: 800; vertical-align: middle !important; }
.r-S { background: var(--rS); color: #fff; } .r-H { background: var(--rH); color: #fff; } .r-M { background: var(--rM); color: #3a3000; } .r-L { background: var(--rL); color: #fff; }
.row-act { text-align: center; vertical-align: middle !important; }
.tbl-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dl-wrap { display: block; }
.repeat-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 4px; margin-bottom: 14px; background: #fcfbfe; }
.repeat-head { display: flex; justify-content: space-between; align-items: center; }
.repeat-head h3 { margin: 0 0 10px; color: var(--aj); }
.matrix { border-collapse: collapse; margin-top: 10px; font-size: .85rem; }
.matrix th, .matrix td { border: 1px solid #fff; padding: 5px 12px; text-align: center; }
.matrix th { background: #eee9f5; }
.comments { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow: auto; }
.cmt { background: #faf9fc; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.cmt.leader { background: #fffbea; border-color: #f2e2a6; }
.cmt-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cmt p { margin: 4px 0 0; font-size: .9rem; }
.side textarea { margin: 6px 0 8px; }

/* admin */
.list-tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.list-tbl th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px; border-bottom: 2px solid var(--line); }
.list-tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list-tbl tr.disabled td { opacity: .55; }
.list-tbl td.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.card > input[type=search] { margin-bottom: 10px; }
.temp-pw { font: 700 1.4rem ui-monospace, Menlo, monospace; background: var(--brand-soft); padding: 10px; border-radius: 8px; text-align: center; letter-spacing: .05em; user-select: all; }

/* modal & toast */
.modal { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal::backdrop { background: rgba(30,20,50,.45); }
.modal-inner { padding: 22px; } .modal-inner h2 { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #2a2238; color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: .25s; z-index: 100; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--ok); } .toast.bad { background: var(--bad); }

@media (max-width: 980px) {
  .doc-grid, .proj-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .doc-head.sticky { top: 88px; }
}
@media (max-width: 720px) {
  .grid2, .row2, .auth { grid-template-columns: 1fr; }
  .auth { gap: 10px; min-height: auto; padding-top: 30px; }
  .auth-brand { text-align: center; }
  h1 { font-size: 1.4rem; }
  .who-name { display: none; }
  .doc-head.sticky { position: static; }
  .form-sec { padding: 14px 12px 4px; }
  .grid-tbl { min-width: 720px; }
  .list-tbl td.actions { justify-content: flex-start; }
}
@media print { .top, .foot, .side, .doc-actions, .tbl-actions, .row-act, .crumbs { display: none !important; } body { background: #fff; } }

/* guide */
.hero-kicker { font-weight: 600; opacity: .85; margin-bottom: 2px; }
.hero-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn.light { background: #fff; color: var(--brand); border-color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.landing-top { padding-bottom: 10px; }
.people { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0 0 10px; }
.people dt { font-weight: 700; color: var(--brand); }
.people dd { margin: 0; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 12px 38px; display: flex; flex-direction: column; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--aj); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.steps li span { color: var(--muted); font-size: .9rem; }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tl-phase { border: 1px solid var(--line); border-top: 4px solid var(--aj); border-radius: 10px; padding: 12px 14px; background: #fcfdfc; }
.tl-head { display: flex; gap: 10px; align-items: flex-start; }
.tl-head h3 { margin: 2px 0 0; color: var(--aj); }
.tl-head p { margin: 2px 0 6px; }
.tl-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.tl-phase .guide-list { padding-left: 22px; margin: 6px 0 0; font-size: .92rem; }
.tl-phase .guide-list li { margin: 7px 0; }
@media (max-width: 720px) { .people { grid-template-columns: 1fr; gap: 2px; } .people dd { margin-bottom: 8px; } }

/* awards */
.aw-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: .92rem; }
.aw-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.aw-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.aw-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.aw-pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.aw-pill.active { color: #fff; border-color: transparent; background: var(--aw); }
.aw-aj { --aw: #2f7d4f; } .aw-act { --aw: #4b2a7b; } .aw-bronze { --aw: #a0612b; } .aw-silver { --aw: #6f7a86; } .aw-gold { --aw: #b8900f; }
.award-card { border: 1px solid var(--line); border-left: 5px solid var(--aw); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: #fff; }
.aw-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.aw-head h3 { margin: 0; color: var(--aw); }
.aw-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.aw-stats span { background: #f5f3f8; border-radius: 8px; padding: 4px 10px; font-size: .85rem; }
.aw-stats b { font-size: 1.05rem; color: var(--aw); }
.aw-points { margin: 10px 0 8px; padding-left: 20px; } .aw-points li { margin: 4px 0; }
@media (max-width: 720px) { .aw-table thead { display: none; } .aw-table tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; } .aw-table td { display: block; border: 0; padding: 2px 4px; } }

/* program switch */
.prog-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.prog-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 16px; cursor: pointer; font: inherit; text-align: left; }
.prog-btn span { font-size: .78rem; color: var(--muted); }
.prog-btn.active { border-color: var(--aj); background: var(--aj-soft); }
.prog-btn.active b { color: var(--aj); }
@media (max-width: 720px) { .prog-btn { flex: 1 1 100%; } }

/* examples shown on focus */
.ex-box { display: none; margin-top: 6px; background: #fffbea; border: 1px solid #f2e2a6; border-radius: 8px; padding: 8px 10px; font-size: .85rem; }
.fld.has-ex:focus-within .ex-box { display: block; }
.ex-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; color: #7a5a00; margin-bottom: 4px; }
.ex-text { color: #3d3420; }
.ex-bar { display: none; margin-top: 8px; }
.ex-bar.show { display: block; position: sticky; bottom: 10px; z-index: 5; box-shadow: 0 6px 20px rgba(60,40,0,.12); border-radius: 8px; }
.ex-bar .ex-box { display: block; margin: 0; }

/* map viewer */
.mapx-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 10px; }
.mapx-bar .fld { margin: 0; min-width: 200px; }
.mapx-tools, .mapx-dl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.var-in { max-width: 130px; }
.mapx-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; }
.mapx-mapwrap { position: relative; }
.mapx-map { height: 70vh; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #eef0ea; }
.mapx-map.adding { cursor: crosshair; }
.mapx-map.adding .leaflet-grab { cursor: crosshair; }
.mapx-pick { display: grid; place-items: center; height: 100%; color: var(--muted); }
.mapx-cursor { position: absolute; left: 10px; bottom: 10px; z-index: 500; background: rgba(255,255,255,.92); border-radius: 6px; padding: 3px 8px; font: 600 .8rem ui-monospace, Menlo, monospace; pointer-events: none; }
.mapx-side { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; max-height: 70vh; overflow: auto; font-size: .88rem; }
.side-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wp { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 6px; align-items: center; }
.wp input { padding: 4px 6px; font-size: .85rem; }
.wp-n { width: 22px; height: 22px; border-radius: 50%; background: #d62828; color: #fff; font-weight: 700; font-size: .75rem; display: grid; place-items: center; }
.wp-gr { font: 600 .78rem ui-monospace, Menlo, monospace; white-space: nowrap; }
.leg { color: var(--muted); font-size: .78rem; padding: 3px 0 3px 30px; }
.wp-pin { background: #d62828; color: #fff; border: 2px solid #fff; border-radius: 50%; display: grid !important; place-items: center; font: 700 12px sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.small.bad { color: var(--bad); }
.mapcard { text-decoration: none; color: inherit; margin: 0; }
.mapcard img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.mapcard h3 { margin: 8px 0 2px; }
@media (max-width: 900px) { .mapx-body { grid-template-columns: 1fr; } .mapx-map { height: 60vh; } .mapx-side { max-height: none; } }

.banner.newtpl { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.newtpl-btns { display: flex; gap: 6px; }

/* track drawing + compass practice */
.mapx-hint { background: #fffbea; border: 1px solid #f2e2a6; color: #5a4500; border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; font-size: .88rem; }
.leg { padding: 4px 0 6px 30px; font-size: .8rem; color: var(--ink); border-left: 2px dashed #e6b3b3; margin-left: 10px; }
.leg .muted { color: var(--muted); }
.leg-bear { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; margin-top: 5px; }
.leg-bear .btn { grid-column: 1 / -1; justify-self: start; }
.lb { font-size: .75rem; color: var(--muted); }
.ans { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ans-in { width: 70px; padding: 3px 6px; font-size: .85rem; }
.ans-in.ok { border-color: var(--ok); background: var(--aj-soft); }
.ans-in.bad { border-color: var(--bad); background: #fdf0ee; }
.ans-msg { font-size: .75rem; font-weight: 600; }
.ans-msg.ok { color: var(--ok); } .ans-msg.bad { color: var(--bad); }
.linkish { border: 0; background: none; color: var(--brand-2); text-decoration: underline; cursor: pointer; font: inherit; font-size: .75rem; padding: 0; }
.warn-text { color: var(--warn); }
.compass-wrap { position: absolute; pointer-events: none; z-index: 700; }
.compass-svg { pointer-events: none; overflow: visible; }
.compass-svg .ctr, .compass-svg .arm-h { pointer-events: auto; cursor: grab; }

/* heights, Naismith times and profile in the map tool */
.leg-h, .side-tot { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 2px 0; }
.leg-h .up, .side-tot .up { color: #b3541e; }
.leg-h .down, .side-tot .down { color: #1d6fa5; }
.leg-h .time, .side-tot .time { color: #4b2a7b; font-weight: 600; }
.side-tot { background: #f5f3f8; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: .88rem; }
.wp-h { color: var(--muted); font-weight: 400; }
.prof { margin: 0 0 10px; }
.prof-svg { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.prof-svg text { font-size: 9px; fill: var(--muted); }
.prof-svg .pg { stroke: #eee8f4; stroke-width: 1; }
.prof-svg .pa { fill: rgba(179, 84, 30, .14); }
.prof-svg .pl { fill: none; stroke: #b3541e; stroke-width: 1.6; stroke-linejoin: round; }
.prof-svg .pw { stroke: #d62828; stroke-width: .8; stroke-dasharray: 2 2; }
.prof-svg .pn { fill: #d62828; font-weight: 700; }
.leg-h .cn, .side-tot .cn { color: var(--muted); font-size: .92em; }
.banner.info { background: #eef1f8; color: #2c3a5e; border: 1px solid #d3daea; }
.banner.leaderbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
