/* =========================================================
   openOS Stand-Up — Design System
   Derived directly from the HTML prototype.
   No emoji. All visual indicators are Google Material Icons Round.
   ========================================================= */

/* -------- Reset -------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* -------- Tokens -------- */
:root {
  /* Surfaces */
  --bg: #0d0f14;
  --surface: #13161e;
  --surface2: #1a1e29;
  --surface3: #202533;
  --border: #252a38;
  --border-strong: #303749;

  /* Text */
  --text: #e8eaf0;
  --text-muted: #7a8099;
  --text-dim: #4a5068;

  /* Accents */
  --accent: #3d5afe;            /* Standard blue */
  --accent-hover: #5271ff;
  --accent-soft: #3d5afe22;
  --accent-glow: #3d5afe44;

  --accent2: #00e5c3;           /* Wednesday teal */
  --accent2-hover: #1ff0d2;
  --accent2-soft: #00e5c315;
  --accent2-glow: #00e5c344;

  --accent3: #ff9800;           /* Blocker / warning orange */
  --accent3-soft: #ff980020;
  --accent3-glow: #ff980040;

  --red: #ff4d6d;
  --red-soft: #ff4d6d20;
  --green: #00e676;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 100px;

  /* Spacing */
  --pad-card: 28px;
  --pad-input: 12px 14px;

  /* Type */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Motion */
  --t-fast: 0.15s;
  --t-base: 0.2s;
  --t-slow: 0.4s;
}

/* -------- Base -------- */
html {
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-base);
}
a:hover {
  color: var(--accent-hover);
}

/* -------- Material Icons Round sizing system -------- */
.material-icons-round {
  font-feature-settings: 'liga';
  vertical-align: middle;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
/* default inline-with-text */
.material-icons-round { font-size: 18px; }
/* card header glyphs */
.material-icons-round.icon-md { font-size: 24px; }
/* empty / error / hero states */
.material-icons-round.icon-lg { font-size: 32px; }
.material-icons-round.icon-xl { font-size: 48px; }
/* tonal helpers */
.icon-accent  { color: var(--accent); }
.icon-accent2 { color: var(--accent2); }
.icon-accent3 { color: var(--accent3); }
.icon-muted   { color: var(--text-muted); }
.icon-dim     { color: var(--text-dim); }
.icon-red     { color: var(--red); }

/* -------- Layout -------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.container.wide   { max-width: 1100px; }
.container.narrow { max-width: 480px; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row   { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end     { justify-content: flex-end; }
.spacer      { flex: 1; }

/* -------- Header -------- */
.header { margin-bottom: 40px; }
.header-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.header h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 6px;
}
.header h1 span { color: var(--accent); }
.header-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}

/* -------- Top Nav (used across pages) -------- */
.topnav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(8px);
}
.topnav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topnav-brand .material-icons-round { color: var(--accent); }
.topnav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.topnav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--t-base), background var(--t-base);
}
.topnav-link:hover { color: var(--text); background: var(--surface); }
.topnav-link.active { color: var(--accent); background: var(--accent-soft); }
.topnav-user {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* -------- Day Selector pills -------- */
.day-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.day-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-base);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.day-pill:hover { border-color: var(--accent); color: var(--text); }
.day-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.day-pill.active.wednesday {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #0d0f14;
}

/* -------- Card -------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--pad-card);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  animation: fadeUp var(--t-slow) ease both;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.card.wednesday-card::before {
  background: linear-gradient(90deg, var(--accent2), transparent);
}
.card.blocker-card::before {
  background: linear-gradient(90deg, var(--accent3), transparent);
}
.card.flat::before { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}
.shake { animation: shake 0.45s cubic-bezier(.36,.07,.19,.97) both; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}
.card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wednesday-card .card-label { color: var(--accent2); }
.blocker-card .card-label   { color: var(--accent3); }
.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}
.card-icon {
  opacity: 0.7;
  flex-shrink: 0;
}

/* -------- Field -------- */
.meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-label .material-icons-round {
  font-size: 14px;
  color: var(--accent);
}
.wednesday-card .field-label .material-icons-round { color: var(--accent2); }
.blocker-card .field-label .material-icons-round   { color: var(--accent3); }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.wednesday-card .dot { background: var(--accent2); }
.blocker-card .dot   { background: var(--accent3); }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="date"],
textarea,
select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: var(--pad-input);
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  resize: none;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.wednesday-card input:focus,
.wednesday-card textarea:focus,
.wednesday-card select:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px var(--accent2-soft);
}
input[readonly], input[disabled] {
  cursor: default;
  color: var(--text-muted);
}
input.error, textarea.error, select.error { border-color: var(--red); }

textarea { min-height: 90px; line-height: 1.6; }
textarea.short { min-height: 72px; }
textarea.tall  { min-height: 120px; }

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}

/* -------- Input with icon prefix -------- */
.input-icon {
  position: relative;
}
.input-icon > .material-icons-round {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}
.input-icon > input { padding-left: 42px; }

/* -------- Numbered fields -------- */
.numbered-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.numbered-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.num-badge {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 11px;
}
.wednesday-card .num-badge {
  background: var(--accent2-soft);
  border-color: var(--accent2);
  color: var(--accent2);
}
.numbered-field textarea { flex: 1; min-height: 72px; }

/* -------- Blocker toggle -------- */
.blocker-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-base);
  margin-bottom: 10px;
}
.blocker-toggle:hover { border-color: var(--accent3); }
.blocker-toggle.on   { border-color: var(--accent3); background: var(--accent3-soft); }
.blocker-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent3);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  padding: 0;
}
.blocker-toggle .material-icons-round { color: var(--accent3); font-size: 18px; }
.blocker-detail { display: none; }
.blocker-detail.visible { display: block; animation: fadeUp 0.3s ease; }

/* -------- Tag chips (multi + single select) -------- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag .material-icons-round { font-size: 12px; }
.tag:hover { border-color: var(--accent2); color: var(--accent2); }
.tag.selected {
  border-color: var(--accent2);
  background: var(--accent2-soft);
  color: var(--accent2);
}
/* blue variant of tag for non-Wednesday contexts */
.tag.blue:hover { border-color: var(--accent); color: var(--accent); }
.tag.blue.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* -------- Rating row (1–5) -------- */
.rating-row {
  display: flex;
  gap: 6px;
}
.rating-btn {
  flex: 1;
  padding: 10px 4px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.rating-btn .material-icons-round {
  font-size: 18px;
  color: currentColor;
}
.rating-btn:hover { border-color: var(--accent); color: var(--text); }
.rating-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.wednesday-card .rating-btn:hover { border-color: var(--accent2); }
.wednesday-card .rating-btn.selected {
  border-color: var(--accent2);
  background: var(--accent2-soft);
  color: var(--accent2);
}

/* -------- Divider -------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* -------- Wednesday badge -------- */
.wed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  background: var(--accent2-soft);
  border: 1px solid var(--accent2);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  margin-bottom: 20px;
}
.wed-badge .material-icons-round { font-size: 14px; }

/* -------- Buttons -------- */
.action-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 13px 24px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn .material-icons-round { font-size: 18px; }

.btn-primary { background: var(--accent); color: #fff; flex: 1; }
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-teal { background: var(--accent2); color: #0d0f14; }
.btn-teal:hover:not(:disabled) {
  background: var(--accent2-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent2-glow);
}
.btn-warn { background: var(--accent3); color: #0d0f14; }
.btn-warn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent3-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--text-muted);
  color: var(--text);
}
.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red-soft);
}
.btn-danger:hover:not(:disabled) {
  background: var(--red-soft);
}
.btn-sm  { padding: 8px 14px; font-size: 11px; }
.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border-color: var(--border);
}
.btn-icon:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

/* -------- Alerts / inline messages -------- */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-top: 20px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
}
.alert .material-icons-round { font-size: 20px; flex-shrink: 0; }
.alert.success {
  background: var(--accent2-soft);
  border-color: var(--accent2);
  color: var(--accent2);
}
.alert.error {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}
.alert.warn {
  background: var(--accent3-soft);
  border-color: var(--accent3);
  color: var(--accent3);
}
.alert.hidden { display: none; }

/* -------- Success message (inline form footer) -------- */
.success-msg {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--accent2-soft);
  border: 1px solid var(--accent2);
  border-radius: var(--r-lg);
  margin-top: 20px;
  font-size: 14px;
  color: var(--accent2);
  font-weight: 500;
}
.success-msg.show { display: flex; animation: fadeUp 0.4s ease; }
.success-msg .material-icons-round { font-size: 20px; }

/* -------- Off-day state -------- */
.off-day {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}
.off-day.show { display: flex; animation: fadeUp 0.4s ease; }
.off-day .material-icons-round {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--text-muted);
}
.off-day h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.off-day p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.6;
}

/* -------- Empty state (lists) -------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  color: var(--text-muted);
}
.empty-state .material-icons-round {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--text-dim);
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-state p { font-size: 13px; max-width: 320px; line-height: 1.5; }

/* -------- Char count -------- */
.char-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-align: right;
  margin-top: 4px;
}

/* -------- Form wrapper visibility helpers -------- */
.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* -------- Login screen (index.html) -------- */
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
}
.login-card .header { margin-bottom: 28px; text-align: center; }
.login-card .header h1 { font-size: 30px; }
.login-step { animation: fadeUp 0.4s ease both; }

/* -------- Dropdown / select w/ icon -------- */
.member-select {
  width: 100%;
  appearance: none;
  background:
    var(--surface2)
    url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%237a8099' d='M6 8L0 0h12z'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  padding-right: 36px;
}

/* -------- Tables (admin) -------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface2);
  position: sticky;
  top: 0;
  z-index: 1;
}
.data-table tbody tr:hover { background: var(--surface2); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* -------- Badge -------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
}
.badge .material-icons-round { font-size: 12px; }
.badge.blue { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.badge.teal { color: var(--accent2); border-color: var(--accent2); background: var(--accent2-soft); }
.badge.warn { color: var(--accent3); border-color: var(--accent3); background: var(--accent3-soft); }
.badge.red  { color: var(--red); border-color: var(--red); background: var(--red-soft); }

/* -------- Toggle switch (admin members on/off) -------- */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.switch .material-icons-round { font-size: 28px; color: var(--text-dim); }
.switch.on .material-icons-round { color: var(--accent2); }
.switch.on { color: var(--accent2); }

/* -------- Dashboard panels -------- */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.stat {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* -------- Comment block -------- */
.comment {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface2);
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.comment-meta strong { color: var(--text); font-weight: 500; }
.comment-body { font-size: 14px; line-height: 1.5; color: var(--text); }

/* -------- Modal / sheet -------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}
.modal-mask.show { display: flex; animation: fadeUp 0.3s ease; }
.modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}

/* -------- Spinner -------- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------- Utility: visually hidden -------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -------- Focus ring (keyboard) -------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* -------- Markdown content -------- */
.md > *:first-child { margin-top: 0; }
.md > *:last-child  { margin-bottom: 0; }
.md p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 12px;
}
.md .md-h {
  font-family: var(--font-display);
  color: var(--text);
  margin: 16px 0 8px;
  line-height: 1.2;
}
.md .md-h1 { font-size: 22px; font-weight: 800; }
.md .md-h2 { font-size: 18px; font-weight: 700; }
.md .md-h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.md .md-list {
  margin: 0 0 12px 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.md .md-list li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.md .md-list-ordered { list-style: decimal; }
.md .md-list:not(.md-list-ordered) { list-style: disc; }
.md .md-quote {
  border-left: 2px solid var(--accent);
  background: var(--surface2);
  color: var(--text-muted);
  padding: 10px 14px;
  font-size: 13px;
  margin: 0 0 12px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.md .md-link { color: var(--accent); }
.md .md-link:hover { color: var(--accent-hover); text-decoration: underline; }
.md .md-inline-code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.md .md-code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin: 0 0 12px;
  overflow-x: auto;
}
.md .md-code code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre;
}
.md .md-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.md strong { color: var(--text); }
.md em     { color: var(--text); }

/* -------- Responsive -------- */
@media (max-width: 900px) {
  /* Tablets / phones: collapse the multi-column dashboard grid */
  .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topnav {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }
  .topnav-brand { font-size: 14px; }
  .topnav-links {
    width: 100%;
    order: 3;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .topnav-links::-webkit-scrollbar { display: none; }
  .topnav-link { flex-shrink: 0; }
  .topnav-user {
    margin-left: auto;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .container { padding: 28px 16px 64px; }
  .container.wide { padding: 28px 16px 64px; }
  .day-selector {
    margin-bottom: 24px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .day-selector::-webkit-scrollbar { display: none; }
  .day-pill { flex-shrink: 0; }
  .card { padding: 22px 18px; }
  .header { margin-bottom: 28px; }
  .modal-mask { padding: 12px; }
  .modal { padding: 22px; }
}
@media (max-width: 500px) {
  .container { padding: 22px 14px 56px; }
  .container.wide { padding: 22px 14px 56px; }
  .meta-row { grid-template-columns: 1fr; }
  .rating-row { gap: 4px; }
  .rating-btn { font-size: 10px; padding: 8px 2px; }
  .rating-btn .material-icons-round { font-size: 16px; }
  .btn { padding: 11px 16px; font-size: 12px; }
  .btn-primary { flex: 1 1 100%; }
  .action-row { gap: 8px; }
  .card { padding: 18px 14px; }
  .card-header { margin-bottom: 18px; }
  .header h1 { font-size: 26px; }
  .header-sub { font-size: 12px; }
  /* tags scroll-snap horizontally to keep the form short */
  .tag-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .tag-row::-webkit-scrollbar { display: none; }
  .tag { flex-shrink: 0; }
  .data-table th, .data-table td { padding: 10px 12px; }
  .login-card .header h1 { font-size: 24px; }
}
