/* Ikarus Panel. Colours, fonts and crest follow the Hephaestus Labs site theme (theme/hephaestus-labs/assets/css/hl.css).
   Fonts are self-hosted (SIL Open Font License, see /fonts/OFL-*.txt). Mobile-first; no inline styles anywhere. */

/* ------------------------------------------------ fonts */
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/alegreya-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/alegreya-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/alegreya-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/alegreya-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans SC"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/alegreya-sans-sc-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans SC"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/alegreya-sans-sc-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans SC"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/alegreya-sans-sc-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans SC"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/alegreya-sans-sc-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/fonts/alegreya-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/fonts/alegreya-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Grenze Gotisch"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/grenze-gotisch-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Grenze Gotisch"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/grenze-gotisch-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ------------------------------------------------ tokens (from hl.css) */
:root {
  --sable: #15130F;
  --sable-f: #0F0E0C;
  --iron: #1D1A15;
  --iron-2: #25211B;
  --iron-3: #2E2922;
  --line: rgba(230, 224, 212, .12);
  --line-2: rgba(230, 224, 212, .22);
  --argent: #E6E0D4;
  --ash: #A59D8F;
  --ash-2: #857D70;
  --or: #D1AE5B;
  --or-2: #E3C57E;
  --gules: #8E2A22;
  --gules-ink: #E58B7E;
  --azure: #264E8A;
  --azure-ink: #8FB2EA;
  --vert: #2C6446;
  --vert-ink: #86C9A0;
  --tenne: #9A5420;
  --tenne-ink: #E8A46A;
  --f-body: "Alegreya Sans", system-ui, sans-serif;
  --f-serif: Alegreya, Georgia, serif;
  --f-caps: "Alegreya Sans SC", "Alegreya Sans", sans-serif;
  --f-black: "Grenze Gotisch", Georgia, serif;
  --r: 4px;
  --gap: 16px;
  --top-h: 58px;
  --tab-h: 62px;
  --side-w: 236px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

/* ------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0; min-height: 100vh; background: var(--sable); color: var(--argent);
  font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--or-2); }
a:hover { color: #F0D48A; }
h1, h2, h3 { font-family: var(--f-serif); color: var(--argent); line-height: 1.12; margin: 0 0 .5rem; }
h1 { font-weight: 800; font-size: clamp(1.75rem, 5vw, 2.3rem); }
h2 { font-weight: 700; font-size: 1.3rem; }
h3 { font-weight: 700; font-size: 1.1rem; }
p { margin: 0 0 .75rem; }
code, kbd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; background: var(--iron-3); padding: .05em .35em; border-radius: 3px; }
::selection { background: var(--or); color: #1A1408; }
:focus-visible { outline: 2px solid var(--or-2); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ash); }
.small { font-size: .92rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: .6em 1em; background: var(--or); color: #1A1408; font-weight: 700; text-decoration: none; border-radius: var(--r); }
.skip:focus { top: 12px; }
.noscript { padding: 2rem; text-align: center; }

/* ------------------------------------------------ buttons + chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .55em 1.15em; border: 1px solid var(--or); border-radius: var(--r);
  background: var(--or); color: #1A1408; font: inherit; font-weight: 700; line-height: 1.15;
  text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--or-2); border-color: var(--or-2); color: #1A1408; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--or-2); }
.btn--ghost:hover { background: rgba(209, 174, 91, .12); color: var(--or-2); }
.btn--danger { background: var(--gules); border-color: #B2453B; color: #FBEDEA; }
.btn--danger:hover { background: #A5352C; border-color: #C4574D; color: #fff; }
.btn--sm { min-height: 36px; padding: .35em .8em; font-size: .95rem; }
.btn--big { min-height: 52px; padding: .7em 1.6em; font-size: 1.1rem; }
.btn--block { width: 100%; }
.btns { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .9rem; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--or-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.presets { display: flex; flex-wrap: wrap; gap: .45rem; margin: .1rem 0 .7rem; }
.chip {
  min-height: 40px; padding: .35em .9em; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--iron-2); color: var(--argent); font: inherit; font-weight: 500; cursor: pointer;
}
.chip:hover { border-color: var(--or); }
.chip[aria-pressed="true"] { border-color: var(--or); background: rgba(209, 174, 91, .16); color: var(--or-2); }

/* ------------------------------------------------ loading + sign-in */
.loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 1rem; color: var(--ash); text-align: center; padding: 16px; }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.signin__box { width: min(100%, 440px); text-align: center; }
.signin__crest { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); }
.signin__title { font-family: var(--f-black); font-weight: 700; font-size: clamp(2.6rem, 11vw, 3.4rem); margin: .6rem 0 .4rem; }
.signin__lede { color: var(--ash); font-size: 1.1rem; }
.signin__msg { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid var(--line-2); border-left: 4px solid var(--tenne-ink); border-radius: var(--r); background: var(--iron); text-align: left; }
.signin__msg--bad { border-left-color: var(--gules-ink); }
.signin__note { margin-top: 1.4rem; color: var(--ash-2); font-size: .95rem; }
.plain { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.plain__box { width: min(100%, 520px); }

/* ------------------------------------------------ app frame */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .75rem;
  min-height: var(--top-h); padding: 6px 16px; background: rgba(21, 19, 15, .96);
  border-bottom: 1px solid var(--line-2); backdrop-filter: blur(6px);
}
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-top: 1px solid rgba(209, 174, 91, .5); pointer-events: none; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--argent); text-decoration: none; min-width: 0; }
.brand img { flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.brand__name { font-family: var(--f-black); font-weight: 700; font-size: 1.45rem; line-height: 1; white-space: nowrap; }
.top__server { margin-left: auto; display: flex; align-items: center; gap: .45rem; min-width: 0; }
.top__label { font-family: var(--f-caps); font-weight: 700; font-size: .85rem; color: var(--ash); letter-spacing: .04em; }
.top__user { display: none; align-items: center; gap: .6rem; }
.top__who { color: var(--ash); font-size: .95rem; }
.top__who strong { color: var(--argent); font-weight: 500; }

@media (max-width: 599px) {
  .top { gap: .5rem; padding: 6px 12px; }
  .top__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand__name { font-size: 1.22rem; }
  .select--compact { max-width: 52vw; }
}

.side { display: none; }
.side__group { margin: 1.1rem 0 .3rem; padding: 0 .75rem; font-family: var(--f-caps); font-weight: 700; font-size: .8rem; letter-spacing: .07em; color: var(--ash-2); }
.side a, .sheet__nav a {
  display: flex; align-items: center; min-height: 42px; padding: .35rem .75rem; border-radius: var(--r);
  color: var(--argent); text-decoration: none; font-weight: 500; border-left: 3px solid transparent;
}
.side a:hover, .sheet__nav a:hover { background: var(--iron-2); }
.side a[aria-current="page"], .sheet__nav a[aria-current="page"] { background: var(--iron-2); border-left-color: var(--or); color: var(--or-2); }

.view { padding: 18px 16px calc(var(--tab-h) + var(--safe-b) + 32px); max-width: 960px; outline: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  min-height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(21, 19, 15, .97); border-top: 1px solid var(--line-2); backdrop-filter: blur(6px);
}
.tabbar a, .tabbar button {
  display: flex; align-items: center; justify-content: center; min-height: var(--tab-h); padding: 0 .2rem;
  border: 0; border-top: 3px solid transparent; background: none; color: var(--ash);
  font: inherit; font-family: var(--f-caps); font-weight: 700; font-size: .98rem; letter-spacing: .02em; text-decoration: none; cursor: pointer;
}
.tabbar a[aria-current="page"] { color: var(--or-2); border-top-color: var(--or); }
.tabbar a:hover, .tabbar button:hover { color: var(--argent); }

@media (min-width: 900px) {
  .top { padding: 6px 24px; }
  .top__server { margin-left: 2rem; }
  .top__user { display: flex; margin-left: auto; }
  .side {
    display: block; position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--side-w);
    padding: 10px 12px 24px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--sable);
  }
  .view { margin-left: var(--side-w); padding: 28px 40px 64px; }
  .tabbar { display: none; }
}

/* ------------------------------------------------ page parts */
.page-head { margin-bottom: 1.2rem; }
.page-head .lede { color: var(--ash); max-width: 62ch; margin-bottom: .35rem; }
.page-head .lede strong { color: var(--argent); font-weight: 700; }
.page-head__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; font-size: .95rem; color: var(--ash); }
.page-head__meta strong { color: var(--or-2); font-weight: 700; }
.back { display: inline-block; margin-bottom: .8rem; font-weight: 500; }

.card {
  position: relative; margin: 0 0 16px; padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--iron);
}
.card > h2:first-child, .card > header:first-child h2 { margin-top: 0; }
.card__lede { color: var(--ash); margin-top: -.2rem; }
.card--danger { border-color: rgba(229, 139, 126, .35); }
.card--danger > h2 { color: var(--gules-ink); }
.card--error { border-left: 4px solid var(--gules-ink); }
.card--note { border-left: 4px solid var(--azure-ink); }
@media (min-width: 600px) { .card { padding: 22px 24px; } }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 16px; }
.grid > .card { margin: 0; }
.cols { display: grid; gap: 0 20px; }
@media (min-width: 700px) { .cols--2 { grid-template-columns: 1fr 1fr; } .cols--3 { grid-template-columns: repeat(3, 1fr); } }

.quick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.quick a { display: block; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--iron-2); color: var(--argent); text-decoration: none; }
.quick a:hover { border-color: var(--or); }
.quick strong { display: block; color: var(--or-2); font-size: 1.05rem; margin-bottom: .2rem; }
.quick span { color: var(--ash); font-size: .95rem; }

/* status cards */
.status__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.status__icon { width: 48px; height: 48px; border-radius: 50%; flex: none; background: var(--iron-3); object-fit: cover; }
.status__name { margin: 0; font-size: 1.35rem; }
.badge { display: inline-flex; align-items: center; gap: .35em; padding: .12em .6em; border-radius: 999px; font-family: var(--f-caps); font-weight: 700; font-size: .82rem; letter-spacing: .03em; border: 1px solid currentColor; }
.badge--ok { color: var(--vert-ink); }
.badge--bad { color: var(--gules-ink); }
.badge--warn { color: var(--tenne-ink); }
.badge--info { color: var(--azure-ink); }
.badge--gold { color: var(--or-2); }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; }

.kv { display: grid; grid-template-columns: minmax(8.5rem, max-content) 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { font-family: var(--f-caps); font-weight: 700; font-size: .88rem; letter-spacing: .03em; color: var(--ash); padding-top: .12rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------ forms */
.form { display: block; }
.field { margin: 0 0 1rem; }
.field > label, .field__label, fieldset > legend {
  display: block; margin-bottom: .3rem; font-family: var(--f-caps); font-weight: 700; font-size: .92rem; letter-spacing: .03em; color: var(--argent);
}
.field__opt { font-family: var(--f-body); font-weight: 400; color: var(--ash-2); letter-spacing: 0; }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 46px; padding: .55em .8em; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--sable-f); color: var(--argent); font: inherit; font-size: 1.05rem;
}
.input::placeholder, .textarea::placeholder { color: var(--ash-2); opacity: 1; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--or-2); outline-offset: 1px; border-color: var(--or); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--gules-ink); }
.textarea { min-height: 150px; resize: vertical; line-height: 1.45; }
.select--compact { width: auto; min-height: 38px; max-width: 46vw; padding: .3em .6em; font-size: 1rem; }
.field__hint { margin: .35rem 0 0; color: var(--ash); font-size: .93rem; }
.field__error { margin: .3rem 0 0; color: var(--gules-ink); font-weight: 500; font-size: .95rem; }
.field__error:empty { display: none; }
.field__count { float: right; color: var(--ash-2); font-size: .88rem; font-family: var(--f-body); font-weight: 400; letter-spacing: 0; }
.field__count--over { color: var(--gules-ink); font-weight: 700; }
.row { display: flex; gap: .6rem; align-items: flex-start; }
.row > .grow { flex: 1; min-width: 0; }
fieldset { margin: 0 0 1rem; padding: 0; border: 0; }
.choices { display: grid; gap: .5rem; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--sable-f); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--or); background: rgba(209, 174, 91, .08); }
.choice input { margin: .25rem 0 0; width: 18px; height: 18px; accent-color: var(--or); flex: none; }
.choice strong { display: block; font-weight: 700; }
.choice span { color: var(--ash); font-size: .93rem; }
.note { padding: .7rem .9rem; border-left: 3px solid var(--azure-ink); background: rgba(38, 78, 138, .14); border-radius: var(--r); color: var(--argent); font-size: .96rem; }
.note--warn { border-left-color: var(--tenne-ink); background: rgba(154, 84, 32, .14); }

/* ------------------------------------------------ lists */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.person {
  display: flex; align-items: center; gap: .8rem; width: 100%; padding: 10px 12px; min-height: 60px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--iron-2); color: var(--argent); text-decoration: none;
}
.person:hover { border-color: var(--or); color: var(--argent); }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--iron-3); object-fit: cover; }
.avatar--lg { width: 72px; height: 72px; }
.person__main { min-width: 0; flex: 1; }
.person__name { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__meta { display: block; color: var(--ash); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__go { color: var(--or-2); font-family: var(--f-caps); font-weight: 700; font-size: .9rem; }

.member-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.member-head h1 { margin: 0; font-size: clamp(1.6rem, 6vw, 2.1rem); overflow-wrap: anywhere; }
.member-head .muted { margin: .1rem 0 .4rem; }
.roles { display: flex; flex-wrap: wrap; gap: .35rem; }
.role { padding: .08em .55em; border: 1px solid var(--line-2); border-radius: 999px; font-size: .9rem; }
.actions { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.actions > .card { margin: 0; }
.locked { color: var(--ash); font-size: .95rem; padding: .6rem .8rem; border: 1px dashed var(--line-2); border-radius: var(--r); }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.table th { text-align: left; font-family: var(--f-caps); font-weight: 700; font-size: .85rem; letter-spacing: .04em; color: var(--ash); padding: .45rem .5rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: var(--argent); text-decoration: none; font-weight: 500; }
.table a:hover { color: var(--or-2); text-decoration: underline; }
.who { display: flex; align-items: center; gap: .55rem; min-width: 10rem; }
.who .avatar { width: 28px; height: 28px; }

.progress { display: block; width: 100%; height: 12px; margin: .4rem 0 .2rem; appearance: none; border: 1px solid var(--line-2); border-radius: 999px; background: var(--sable-f); overflow: hidden; }
.progress::-webkit-progress-bar { background: var(--sable-f); }
.progress::-webkit-progress-value { background: linear-gradient(90deg, #A8873E, var(--or-2)); }
.progress::-moz-progress-bar { background: linear-gradient(90deg, #A8873E, var(--or-2)); }
.big-level { font-family: var(--f-serif); font-weight: 800; font-size: 1.8rem; line-height: 1.1; margin: 0; }

/* tabs */
.tabs { display: flex; gap: .2rem; overflow-x: auto; overflow-y: hidden; margin: 0 0 1rem; border-bottom: 1px solid var(--line-2); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .pv-sticky { position: sticky; top: calc(var(--top-h) + 16px); } }
.tab {
  flex: none; min-height: 44px; padding: .4rem .95rem; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  background: none; color: var(--ash); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--argent); }
.tab[aria-selected="true"] { color: var(--or-2); border-bottom-color: var(--or); }

/* logs */
.logs { list-style: none; margin: 0; padding: 0; }
.log { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.log:last-child { border-bottom: 0; }
.log time { display: block; font-family: var(--f-caps); font-weight: 700; font-size: .85rem; color: var(--ash); letter-spacing: .03em; margin-bottom: .15rem; }
.log p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.empty { padding: 1.2rem; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--ash); text-align: center; }
.empty strong { display: block; color: var(--argent); font-size: 1.05rem; margin-bottom: .25rem; }
.empty p { margin: 0 auto .6rem; max-width: 52ch; }

/* help */
.help details { border: 1px solid var(--line); border-radius: var(--r); background: var(--iron); margin-bottom: 10px; }
.help summary { padding: .9rem 1rem; cursor: pointer; font-family: var(--f-serif); font-weight: 700; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "+"; color: var(--ash); font-family: var(--f-body); }
.help details[open] summary::after { content: "\2212"; }
.help .help__body { padding: 0 1rem 1rem; }
.help ol, .help ul { margin: 0 0 .8rem; padding-left: 1.3rem; }
.help li { margin-bottom: .35rem; }
.example { display: block; margin: .3rem 0 .7rem; padding: .55rem .8rem; border-left: 3px solid var(--or); background: var(--iron-2); border-radius: var(--r); color: var(--argent); }

/* ------------------------------------------------ Discord preview (approximate) */
.pv { padding: 14px 14px 16px; border-radius: 6px; background: #313338; color: #DBDEE1; font-family: "gg sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 1.375; overflow-wrap: anywhere; }
.pv__label { margin: 0 0 .5rem; font-family: var(--f-caps); font-weight: 700; font-size: .85rem; letter-spacing: .04em; color: var(--ash); }
.pv__msg { display: flex; gap: 12px; }
.pv__avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: #1E1F22; object-fit: cover; }
.pv__body { min-width: 0; flex: 1; }
.pv__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.pv__name { color: #F2F3F5; font-weight: 600; }
.pv__app { padding: 0 4px; border-radius: 3px; background: #5865F2; color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; }
.pv__time { color: #949BA4; font-size: 12px; }
.pv__content { white-space: pre-wrap; }
.pv__embed { margin-top: 6px; max-width: 520px; padding: 8px 16px 12px 12px; border-left: 4px solid #E6A23C; border-radius: 4px; background: #2B2D31; }
.pv__title { margin: 4px 0 6px; color: #F2F3F5; font-weight: 600; font-size: 16px; }
.pv__desc { font-size: 14px; white-space: pre-wrap; }
.pv__desc blockquote { margin: 0; padding-left: 10px; border-left: 4px solid #4E5058; }
.pv__h1 { font-size: 20px; font-weight: 700; color: #F2F3F5; display: block; margin: 4px 0; }
.pv__h2 { font-size: 18px; font-weight: 700; color: #F2F3F5; display: block; margin: 4px 0; }
.pv__h3 { font-size: 16px; font-weight: 700; color: #F2F3F5; display: block; margin: 4px 0; }
.pv code { background: #1E1F22; color: #DBDEE1; padding: 0 .25em; border-radius: 3px; font-size: 85%; }
.pv__mention { padding: 0 2px; border-radius: 3px; background: rgba(88, 101, 242, .3); color: #C9CDFB; font-weight: 500; }
.pv__link { color: #00A8FC; }
.pv__empty { color: #949BA4; font-style: italic; }

/* ------------------------------------------------ dialogs + toasts */
.dialog, .sheet {
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--iron); color: var(--argent); padding: 0;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
}
.dialog { width: min(92vw, 480px); }
.dialog::backdrop, .sheet::backdrop { background: rgba(8, 7, 6, .72); backdrop-filter: blur(3px); }
.dialog__form { padding: 22px 20px 18px; }
.dialog__title { font-size: 1.35rem; margin-bottom: .6rem; }
.dialog__text { font-size: 1.05rem; }
.dialog__undo { color: var(--ash); font-size: .97rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.dialog__undo:empty { display: none; }
.dialog__actions { display: flex; flex-wrap: wrap-reverse; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
@media (max-width: 480px) { .dialog__actions .btn { flex: 1 1 100%; } }

.sheet { width: 100%; max-width: 100%; max-height: 85vh; margin: auto 0 0; border-radius: 10px 10px 0 0; padding-bottom: var(--safe-b); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.sheet__head h2 { margin: 0; }
.sheet__nav { padding: 0 10px; overflow-y: auto; }
.sheet__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 12px 16px 16px; border-top: 1px solid var(--line); margin-top: 8px; }
.sheet__foot p { margin: 0; }

.toasts { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
@media (min-width: 900px) { .toasts { left: auto; right: 24px; bottom: 24px; justify-items: end; } }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: .8rem; width: min(100%, 460px); padding: .75rem .9rem;
  border: 1px solid var(--line-2); border-left: 4px solid var(--vert-ink); border-radius: var(--r); background: var(--iron-2);
  box-shadow: 0 16px 34px -12px rgba(0, 0, 0, .8); animation: toast-in .25s var(--ease) both;
}
.toast p { margin: 0; flex: 1; }
.toast--error { border-left-color: var(--gules-ink); }
.toast--info { border-left-color: var(--azure-ink); }
.toast__close { background: none; border: 0; color: var(--ash); font: inherit; font-size: .9rem; cursor: pointer; padding: .1rem .2rem; }
.toast__close:hover { color: var(--argent); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
