/* Helping Monks — calm, cool, glass. */

:root {
  color-scheme: dark;
  --bg: #070d18;
  --bg-2: #0b1424;
  --aurora-1: rgba(64, 156, 255, 0.30);
  --aurora-2: rgba(56, 214, 196, 0.20);
  --aurora-3: rgba(124, 116, 255, 0.22);

  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --glass-3: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-hi: rgba(255, 255, 255, 0.16);
  --field: rgba(255, 255, 255, 0.06);
  --field-focus: rgba(255, 255, 255, 0.09);

  --text: #eef4ff;
  --text-2: rgba(226, 236, 252, 0.72);
  --text-3: rgba(214, 226, 246, 0.48);
  --line: rgba(255, 255, 255, 0.08);

  --accent: #7cc4ff;
  --accent-2: #5ee0cc;
  --accent-ink: #06182b;
  --accent-soft: rgba(124, 196, 255, 0.14);
  --ok: #6be0b0;
  --ok-soft: rgba(107, 224, 176, 0.13);
  --warn: #f5c76b;
  --warn-soft: rgba(245, 199, 107, 0.13);
  --bad: #ff8b8b;
  --bad-soft: rgba(255, 139, 139, 0.13);

  --shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 2px rgba(0, 0, 0, 0.2), 0 24px 60px rgba(0, 0, 0, 0.45);
  --blur: blur(28px) saturate(170%);

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #e9f0f8;
    --bg-2: #f4f8fc;
    --aurora-1: rgba(96, 170, 255, 0.35);
    --aurora-2: rgba(90, 220, 200, 0.28);
    --aurora-3: rgba(150, 140, 255, 0.24);

    --glass: rgba(255, 255, 255, 0.55);
    --glass-2: rgba(255, 255, 255, 0.70);
    --glass-3: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.75);
    --glass-hi: rgba(255, 255, 255, 0.95);
    --field: rgba(255, 255, 255, 0.65);
    --field-focus: rgba(255, 255, 255, 0.92);

    --text: #0c1a2c;
    --text-2: rgba(16, 32, 54, 0.70);
    --text-3: rgba(16, 32, 54, 0.46);
    --line: rgba(16, 40, 80, 0.09);

    --accent: #2f7fe6;
    --accent-2: #13a99a;
    --accent-ink: #ffffff;
    --accent-soft: rgba(47, 127, 230, 0.11);
    --ok: #129a6a;
    --ok-soft: rgba(18, 154, 106, 0.11);
    --warn: #b7791f;
    --warn-soft: rgba(214, 150, 40, 0.13);
    --bad: #d64545;
    --bad-soft: rgba(214, 69, 69, 0.10);

    --shadow: 0 1px 2px rgba(20, 40, 80, 0.06), 0 12px 36px rgba(30, 60, 110, 0.10);
    --shadow-lift: 0 2px 4px rgba(20, 40, 80, 0.06), 0 24px 56px rgba(30, 60, 110, 0.16);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--accent-soft); }

/* Ambient aurora behind everything */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 800px at 50% -10%, var(--bg-2), var(--bg)); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.9; animation: drift 28s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 640px; height: 640px; left: -160px; top: -200px; background: var(--aurora-1); }
.aurora i:nth-child(2) { width: 560px; height: 560px; right: -140px; top: 10%; background: var(--aurora-2); animation-duration: 34s; }
.aurora i:nth-child(3) { width: 700px; height: 520px; left: 30%; bottom: -320px; background: var(--aurora-3); animation-duration: 40s; }
@keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } * { transition: none !important; } }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 34px; font-weight: 700; }
h2 { font-size: 21px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.sm { gap: 8px; }
.stack.lg { gap: 28px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 22px; height: 22px; }
.icon.xl { width: 26px; height: 26px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
  border-radius: var(--r-lg);
}
.pad { padding: 22px; }
.pad-lg { padding: 28px; }

.lift { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s; }
.lift:hover { transform: translateY(-3px) scale(1.012); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lift); background: var(--glass-2); }
.lift:active { transform: scale(0.995); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: var(--glass-2); color: var(--text); font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  transition: background 0.2s, transform 0.15s var(--ease), box-shadow 0.2s, opacity 0.2s;
}
.btn:hover { background: var(--glass-3); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 100%, white 12%), var(--accent));
  color: var(--accent-ink); border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); backdrop-filter: none; }
.btn.quiet:hover { background: var(--glass); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.lg { height: 50px; padding: 0 24px; font-size: 15.5px; }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn.icon-only { width: 42px; padding: 0; }
.btn.sm.icon-only { width: 34px; }
.btn.block { width: 100%; }
.btn .badge-dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; }
.btn.has-dot { position: relative; }
.link { color: var(--accent); font-weight: 600; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field > .hint { font-size: 12.5px; color: var(--text-3); }
.input, .textarea, .select {
  width: 100%; min-height: 46px; padding: 11px 16px; border-radius: var(--r-sm);
  background: var(--field); border: 1px solid var(--glass-border); outline: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus { background: var(--field-focus); border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2399a8bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.select option { background: var(--bg-2); color: var(--text); }
.input.title-input { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.015em; min-height: 58px; }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-hi); }
.seg button { height: 34px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--glass-3); color: var(--text); box-shadow: inset 0 1px 0 var(--glass-hi), 0 2px 8px rgba(0, 0, 0, 0.15); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--glass); color: var(--text-2); font-size: 13.5px; font-weight: 550;
  cursor: pointer; user-select: none; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--text); background: var(--glass-2); }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.chip.strong { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip.static { cursor: default; }
.chip.sm { height: 28px; padding: 0 11px; font-size: 12.5px; }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--glass-2); color: var(--text-2); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; display: inline-block; }

.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 650; letter-spacing: 0.01em; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.avatar .avail { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 99px; background: var(--ok); border: 2px solid var(--bg); }
.avatars { display: inline-flex; }
.avatars .avatar { margin-left: -8px; border: 2px solid var(--bg); }
.avatars .avatar:first-child { margin-left: 0; }

/* ---------- app frame ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 16px 28px;
}
.topbar::before {
  content: ''; position: absolute; inset: 0 0 -18px; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; justify-self: start; }
.brand img { width: 32px; height: 32px; }
.tabs { display: inline-flex; gap: 2px; padding: 5px; border-radius: 999px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: 14.5px; transition: background 0.25s var(--ease), color 0.2s; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--glass-3); color: var(--text); box-shadow: inset 0 1px 0 var(--glass-hi), 0 2px 10px rgba(0, 0, 0, 0.18); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.top-actions .avatar { cursor: pointer; }
main { max-width: 1160px; margin: 0 auto; padding: 18px 28px 120px; }
main.narrow { max-width: 760px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 18px 0 26px; flex-wrap: wrap; }
.page-head p { margin-top: 8px; color: var(--text-2); font-size: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 14px; margin: 8px 0 4px; cursor: pointer; }
.back:hover { color: var(--text); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title h2 { font-size: 20px; }
.section-title a { color: var(--text-2); font-weight: 600; font-size: 14px; }
.section-title a:hover { color: var(--accent); }

/* ---------- home ---------- */
.hero { text-align: center; padding: 48px 0 12px; }
.hero .hello { color: var(--text-2); font-size: 16px; font-weight: 550; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 750; letter-spacing: -0.035em; margin: 10px 0 26px; }
.hero h1 span { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.searchbar { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 12px 0 22px; border-radius: 999px; cursor: text; }
.searchbar input { flex: 1; border: 0; background: transparent; outline: none; font-size: 17px; min-width: 0; }
.searchbar input::placeholder { color: var(--text-3); }
.kbd { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 3px 8px; border-radius: 7px; border: 1px solid var(--glass-border); }

.actions3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0 48px; }
.action-tile { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--r-xl); cursor: pointer; text-align: left; }
.action-tile .ic { width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: var(--accent-ink);
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 22px color-mix(in srgb, var(--accent) 30%, transparent); }
.action-tile:nth-child(2) .ic { background: linear-gradient(140deg, var(--accent-2), #8fe6a8); }
.action-tile:nth-child(3) .ic { background: linear-gradient(140deg, #a59bff, var(--accent)); }
.action-tile h3 { font-size: 19px; }
.action-tile p { color: var(--text-2); font-size: 14px; margin-top: -6px; }

.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin: 0 -4px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }

.entry-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-lg); min-height: 196px; }
.entry-card h3 { font-size: 17px; line-height: 1.3; }
.entry-card .summary { color: var(--text-2); font-size: 14px; }
.entry-card .foot { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }

.list { display: flex; flex-direction: column; overflow: hidden; }
.item { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); transition: background 0.2s; }
.item:first-child { border-top: 0; }
a.item:hover, .item.clickable:hover { background: var(--glass); cursor: pointer; }
.item .t { font-weight: 600; font-size: 15px; }
.item .m { color: var(--text-3); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.item .chev { color: var(--text-3); }
.type-ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--glass-2); color: var(--accent); box-shadow: inset 0 1px 0 var(--glass-hi); }

.attention { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--glass-border)); }
.dyk { display: flex; gap: 18px; align-items: center; padding: 22px 24px; }
.dyk .ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex: none; }

.empty { text-align: center; padding: 40px 24px; color: var(--text-2); }
.empty .ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--glass-2); color: var(--accent); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* ---------- forms pages ---------- */
.form-card { padding: 30px; display: flex; flex-direction: column; gap: 22px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.disclosure > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .icon { transition: transform 0.25s var(--ease); }
.disclosure[open] > summary .icon { transform: rotate(90deg); }
.disclosure[open] > .disclosure-body { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--glass-border); background: var(--glass); cursor: pointer; text-align: left; transition: background 0.2s, border-color 0.2s; }
.type-pick button b { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.type-pick button span { font-size: 12.5px; color: var(--text-3); }
.type-pick button.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.type-pick button.on b { color: var(--accent); }

.similar { padding: 18px 20px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); display: flex; flex-direction: column; gap: 10px; animation: fade 0.3s var(--ease); }
.similar .head { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--accent); font-size: 14px; }
.similar a.sim { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--glass-2); }
.similar a.sim:hover { background: var(--glass-3); }

.person-pick { display: flex; flex-direction: column; gap: 8px; }
.person-pick .opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--glass-border); background: var(--glass); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.person-pick .opt:hover { background: var(--glass-2); }
.person-pick .opt.on { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); }
.person-pick .why { color: var(--text-3); font-size: 12.5px; }
.check { width: 22px; height: 22px; border-radius: 99px; border: 1.5px solid var(--text-3); display: flex; align-items: center; justify-content: center; flex: none; color: transparent; }
.on > .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.files { display: flex; flex-wrap: wrap; gap: 10px; }
.file { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--glass-border); font-size: 13.5px; max-width: 320px; transition: background 0.2s; }
.file:hover { background: var(--glass-3); }
.file .fi { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--glass-3); color: var(--accent); flex: none; overflow: hidden; }
.file .fi img { width: 100%; height: 100%; object-fit: cover; }
.file .fn { font-weight: 600; }
.file .x { color: var(--text-3); cursor: pointer; }

/* ---------- detail pages ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.detail aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.doc-head { padding: 32px; }
.doc-head h1 { font-size: clamp(28px, 3.6vw, 38px); margin: 14px 0 12px; }
.doc-head .lede { font-size: 17px; color: var(--text-2); }
.doc-body { padding: 32px; font-size: 16px; line-height: 1.7; white-space: pre-wrap; word-wrap: break-word; }
.doc-body a, .post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-2); font-size: 14px; }
.meta-row .sep { width: 3px; height: 3px; border-radius: 99px; background: var(--text-3); }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-weight: 550; font-size: 14px; }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.side-card { padding: 20px; }
.side-card h3 { font-size: 14px; color: var(--text-2); font-weight: 650; margin-bottom: 12px; letter-spacing: 0; }

.versions { display: flex; flex-direction: column; }
.ver { position: relative; display: flex; gap: 12px; padding: 10px 10px 10px 0; border-radius: var(--r-sm); cursor: pointer; }
.ver::before { content: ''; position: absolute; left: 10px; top: 32px; bottom: -10px; width: 1.5px; background: var(--line); }
.ver:last-child::before { display: none; }
.ver .vdot { width: 22px; height: 22px; border-radius: 99px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--glass-2); border: 1.5px solid var(--glass-border); z-index: 1; }
.ver.on .vdot { background: var(--accent); border-color: var(--accent); }
.ver .vn { font-weight: 650; font-size: 14px; }
.ver.on .vn { color: var(--accent); }
.ver:hover .vn { color: var(--accent); }

.thread { display: flex; flex-direction: column; gap: 14px; }
.post { padding: 20px 22px; display: flex; gap: 14px; }
.post .post-body { white-space: pre-wrap; word-wrap: break-word; margin-top: 6px; line-height: 1.6; }
.post.answer { border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--glass-border)); background: color-mix(in srgb, var(--ok-soft) 70%, var(--glass)); }
.post .label { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.event { display: flex; align-items: center; gap: 10px; padding: 2px 22px; color: var(--text-3); font-size: 13.5px; }
.event .icon { width: 16px; height: 16px; }
.composer { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.composer .textarea { min-height: 92px; background: transparent; border: 0; padding: 4px 6px; box-shadow: none !important; }
.composer-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--text-2); user-select: none; }
.toggle input { display: none; }
.toggle .sw { width: 38px; height: 23px; border-radius: 99px; background: var(--glass-3); position: relative; transition: background 0.2s; flex: none; }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 99px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 0.25s var(--ease); }
.toggle input:checked + .sw { background: var(--ok); }
.toggle input:checked + .sw::after { transform: translateX(15px); }

.status-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.st-open { color: var(--accent); }
.st-accepted, .st-in_progress { color: var(--accent-2); }
.st-completed { color: var(--ok); }
.st-closed { color: var(--text-3); }

/* mentions */
.mention-menu { position: absolute; z-index: 60; min-width: 240px; padding: 6px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lift); }
.mention-menu div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.mention-menu div.on, .mention-menu div:hover { background: var(--glass-2); }
.mention { color: var(--accent); font-weight: 600; }

/* ---------- profile ---------- */
.profile-head { padding: 34px; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.counts { display: flex; gap: 28px; }
.counts div b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.counts div span { color: var(--text-3); font-size: 13px; }
.thanks-card { padding: 18px 20px; display: flex; gap: 12px; }
.thanks-card q { quotes: none; font-size: 15px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 38px 34px; border-radius: var(--r-xl); display: flex; flex-direction: column; gap: 22px; }
.auth-card .logo { width: 64px; height: 64px; margin: 0 auto; }
.auth-card .tagline { text-align: center; }
.auth-card .tagline h1 { font-size: 26px; }
.auth-card .tagline p { color: var(--text-2); margin-top: 8px; }
.error { padding: 11px 14px; border-radius: var(--r-sm); background: var(--bad-soft); color: var(--bad); font-size: 14px; font-weight: 550; }

/* ---------- popovers, modal, toast ---------- */
.popover { position: fixed; z-index: 70; width: 380px; max-height: min(70vh, 560px); overflow: auto; border-radius: var(--r-lg); background: color-mix(in srgb, var(--bg-2) 82%, transparent); animation: pop 0.22s var(--ease); }
.popover .head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; }
.menu { width: 240px; padding: 8px; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 0; background: none; cursor: pointer; font-size: 14.5px; font-weight: 550; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--glass-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.notif { display: flex; gap: 12px; padding: 12px 18px; cursor: pointer; font-size: 14px; }
.notif:hover { background: var(--glass); }
.notif.unread .t { font-weight: 600; }
.notif.unread::after { content: ''; width: 8px; height: 8px; border-radius: 99px; background: var(--accent); margin-top: 6px; flex: none; }

.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(4, 10, 20, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; animation: fade 0.2s; overflow: auto; }
.modal { width: 100%; max-width: 520px; border-radius: var(--r-xl); background: color-mix(in srgb, var(--bg-2) 88%, transparent); animation: pop 0.28s var(--ease); }
.modal.wide { max-width: 640px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 24px 26px 4px; }
.modal-head p { color: var(--text-2); margin-top: 6px; font-size: 14px; }
.modal-body { padding: 18px 26px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 6px 26px 24px; display: flex; justify-content: flex-end; gap: 10px; }
.spotlight { max-width: 640px; }
.spotlight .searchbar { height: 64px; border-radius: var(--r-xl) var(--r-xl) 0 0; max-width: none; background: transparent; box-shadow: none; border: 0; border-bottom: 1px solid var(--line); }
.spotlight .results { max-height: 56vh; overflow: auto; padding: 8px; }
.spotlight .group { padding: 10px 12px 4px; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.spotlight a.res { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.spotlight a.res:hover, .spotlight a.res.on { background: var(--glass-2); }
mark { background: color-mix(in srgb, var(--accent) 25%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

#toasts { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; display: flex; gap: 10px; align-items: center; animation: pop 0.3s var(--ease); background: color-mix(in srgb, var(--bg-2) 85%, transparent); }
.toast.err { color: var(--bad); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fade 0.35s var(--ease); }

.skill-group + .skill-group { margin-top: 18px; }
.skill-group h4 { margin: 0 0 10px; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
table.people { width: 100%; border-collapse: collapse; }
table.people th { text-align: left; font-size: 12.5px; color: var(--text-3); font-weight: 600; padding: 14px 20px; }
table.people td { padding: 14px 20px; border-top: 1px solid var(--line); vertical-align: middle; }
.skeleton { height: 120px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--glass), var(--glass-2), var(--glass)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .detail { grid-template-columns: 1fr; }
  .detail aside { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { grid-template-columns: 1fr auto; padding: 12px 16px; }
  .brand span { display: none; }
  .tabs { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; }
  .tabs a { padding: 0 14px; font-size: 13px; flex-direction: column; gap: 0; height: 48px; justify-content: center; }
  .tabs a .label { font-size: 11px; white-space: nowrap; }
  .tabs { padding: 4px; }
  .tabs a { padding: 0 11px; }
  main { padding: 8px 16px 120px; }
  h1 { font-size: 28px; }
  .hero { padding-top: 24px; }
  .actions3 { grid-template-columns: 1fr; gap: 12px; margin: 28px 0 36px; }
  .action-tile { flex-direction: row; align-items: center; padding: 18px; }
  .action-tile p { margin-top: 2px; }
  .form-grid-2, .type-pick { grid-template-columns: 1fr; }
  .form-card, .doc-head, .doc-body, .profile-head { padding: 22px; }
  .popover { left: 12px !important; right: 12px !important; width: auto; }
  .counts { gap: 20px; }
}
