/* Tell OS — EOS platform in Tell Studios' brand palette (same design language as Tell HQ) */
* { box-sizing: border-box; }
:root {
  --bg: #F4EFE7;
  --card: #FFFFFF;
  --ink: #2c313b;
  --muted: #5c626f;
  --line: rgba(44,49,59,.14);
  --accent: #0E93A8;       /* teal, darkened off brand #11ACC5 for AA text contrast */
  --accent-soft: #E1F2F4;
  --warn: #df4a36;         /* brand coral-deep */
  --warn-soft: #FBE9E6;
  --hold: #91700F;         /* darkened brand gold */
  --hold-soft: #FBF1D2;
  --blue: #404655;         /* brand navy */
  --blue-soft: #E6E7EB;
}
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: 32px; margin: 0 0 6px; }
h2 { font-size: 21px; margin: 0 0 12px; }
h3 { font-size: 16.5px; margin: 0 0 8px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px 80px; }
.wrap.wide { max-width: 1440px; }

/* nav */
nav.topbar { background: var(--card); border-bottom: 1px solid var(--line); padding: 0 20px; margin-bottom: 28px; position: relative; }
nav.topbar .inner { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 20px; height: 58px; }
nav.topbar .logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
nav.topbar .logo img { display: block; }
nav.topbar .logo .logo-os { font-family: Georgia, serif; font-size: 19px; font-weight: 700; color: var(--accent); letter-spacing: .01em; }
nav.topbar .nav-primary { display: flex; align-items: center; gap: 18px; }
nav.topbar a.navlink { color: var(--muted); font-size: 15px; padding: 4px 2px; white-space: nowrap; }
nav.topbar a.navlink:hover { text-decoration: none; color: var(--ink); }
nav.topbar a.navlink.active { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); }
nav.topbar .spacer { flex: 1; }
nav.topbar .nav-new { flex-shrink: 0; text-decoration: none; }

/* account menu */
.account { position: relative; }
.acct-btn .caret { font-size: 10px; opacity: .7; }
.acct-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 150px; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(40,32,20,.16); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.acct-menu[hidden] { display: none; }
.acct-item {
  display: block; text-align: left; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--ink); padding: 8px 12px; border-radius: 7px; width: 100%;
}
.acct-item:hover { background: #F3EFE6; text-decoration: none; }

nav.topbar .menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  font-size: 18px; line-height: 1; padding: 6px 10px; cursor: pointer; color: var(--ink); flex-shrink: 0;
}
nav.topbar .nav-drawer { display: none; }
@media (max-width: 860px) {
  nav.topbar .nav-primary, nav.topbar #account-slot, nav.topbar .nav-new, nav.topbar #theme-btn { display: none; }
  nav.topbar .menu-toggle { display: inline-flex; }
  nav.topbar .inner { gap: 12px; }
  nav.topbar.open .nav-drawer {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; top: 58px; left: 0; right: 0; z-index: 45;
    background: var(--card); border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(40,32,20,.14); padding: 10px 16px 16px;
  }
  nav.topbar .nav-drawer a.navlink, nav.topbar .nav-drawer .acct-action {
    display: block; padding: 11px 4px; font-size: 16px;
    text-align: left; background: none; border: none; width: 100%; cursor: pointer; color: var(--ink);
  }
  nav.topbar .nav-drawer a.navlink.active { color: var(--accent); }
  nav.topbar .nav-drawer-account { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
  nav.topbar .nav-drawer .drawer-me { font-size: 13px; color: var(--muted); padding: 4px 4px 2px; }
}

/* cards & layout */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(60,50,30,.04);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.mt0 { margin-top: 0; }
.flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* badges & avatars */
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.on_track { background: var(--accent-soft); color: var(--accent); }
.badge.off_track { background: var(--warn-soft); color: var(--warn); }
.badge.done { background: var(--blue-soft); color: var(--blue); }
.badge.dropped { background: #EFEBE1; color: #6C6355; }
.badge.overdue { background: var(--warn-soft); color: var(--warn); }
.badge.plain { background: #EFEBE1; color: #6C6355; font-weight: 500; }
.badge.company { background: var(--hold-soft); color: var(--hold); }
.badge.open { background: var(--warn-soft); color: var(--warn); }
.badge.solved { background: var(--accent-soft); color: var(--accent); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700; flex-shrink: 0; letter-spacing: .02em;
}
.avatar.open-seat { background: #C9C2B4; }

/* buttons & forms */
.btn {
  display: inline-block; background: var(--ink); color: #fff; border: none; cursor: pointer;
  border-radius: 8px; padding: 9px 18px; font-size: 15px; font-weight: 600;
}
.btn:hover { background: #443C32; }
.btn.green { background: var(--accent); } .btn.green:hover { background: #0A7887; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.btn.ghost:hover { background: #F3EFE6; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.danger { background: var(--warn); }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #CBE2D4; border-color: var(--accent); }
label { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }

/* tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid #F1ECE1; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td .mini { border: none; background: transparent; padding: 3px 4px; width: auto; }
td select.mini { max-width: 140px; }
td input.mini[type="date"] { max-width: 140px; }
.check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.row-done .row-title { text-decoration: line-through; color: var(--muted); }

.dash-section h2 { display: flex; align-items: center; gap: 8px; }
.count-pill { background: var(--ink); color: #fff; border-radius: 99px; font-size: 12px; padding: 0 8px; font-family: -apple-system, sans-serif; }
.empty { color: var(--muted); font-style: italic; padding: 6px 0; }
.err { color: var(--warn); font-size: 14px; margin-top: 8px; }

/* login */
.login-wrap { max-width: 380px; margin: 12vh auto 0; }
.login-wrap .logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.login-wrap .logo .logo-os { font-family: Georgia, serif; font-size: 26px; font-weight: 700; color: var(--accent); }

/* V/TO */
.vto-grid { display: grid; grid-template-columns: 170px 1fr; gap: 0; }
.vto-row { display: contents; }
.vto-label {
  font-family: Georgia, serif; font-weight: 700; font-size: 15px; padding: 18px 14px;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); background: #FAF7F0;
}
.vto-body { padding: 16px 18px; border-bottom: 1px solid var(--line); position: relative; }
.vto-body:last-child, .vto-label:last-of-type { border-bottom: none; }
.vto-edit-btn { position: absolute; top: 12px; right: 12px; }
.vto-body ol, .vto-body ul { margin: 4px 0; padding-left: 20px; }
.vto-body li { margin-bottom: 5px; }
.vto-kv { margin-bottom: 10px; }
.vto-kv .k { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.vto-check { display: flex; gap: 9px; align-items: flex-start; padding: 4px 0; }
.vto-check input { margin-top: 4px; }
.vto-check.done span { color: var(--muted); text-decoration: line-through; }
.vto-stat { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.vto-stat .k { font-weight: 700; min-width: 110px; }
@media (max-width: 760px) {
  .vto-grid { grid-template-columns: 1fr; }
  .vto-label { border-right: none; padding: 10px 14px 6px; }
}

/* rocks */
.rock-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: var(--card); }
.rock-head { display: flex; gap: 10px; align-items: flex-start; }
.rock-title { font-weight: 600; flex: 1; }
.rock-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.rock-miles { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.mile-row { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px; }
.mile-row.done .mile-title { text-decoration: line-through; color: var(--muted); }
.progress-ring { font-size: 12.5px; color: var(--muted); }

/* scorecard */
.sc-table td, .sc-table th { text-align: center; white-space: nowrap; }
.sc-table td:first-child, .sc-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--card); min-width: 220px; }
.sc-cell { width: 62px; border: none; background: transparent; text-align: center; padding: 4px 2px; font: inherit; font-size: 14px; border-radius: 6px; }
.sc-cell:focus { background: #fff; outline: 2px solid var(--accent); }
.sc-hit { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sc-miss { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.sc-goal { font-size: 12.5px; color: var(--muted); }
.sc-week-cur { background: #FBF8F2; }

/* meeting */
.mtg-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .mtg-layout { grid-template-columns: 1fr; } }
.mtg-agenda { position: sticky; top: 14px; }
.mtg-step {
  display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font: inherit; font-size: 14.5px;
  padding: 9px 12px; border-radius: 8px; color: var(--ink);
}
.mtg-step:hover { background: #F3EFE6; }
.mtg-step.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.mtg-step.done-step { color: var(--muted); }
.mtg-step .mins { color: var(--muted); font-size: 12.5px; }
.mtg-timer { font-family: Georgia, serif; font-size: 26px; font-weight: 700; }
.mtg-timer.over { color: var(--warn); }
.rating-row { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.rating-row select { width: 80px; }

/* accountability chart */
.seat-tree { padding-left: 0; }
.seat-node { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: var(--card); }
.seat-children { margin-left: 34px; border-left: 2px solid var(--line); padding-left: 18px; }
.seat-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seat-title { font-weight: 700; font-family: Georgia, serif; font-size: 15.5px; }
.seat-roles { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(43,38,32,.45); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto;
}
.modal {
  background: var(--bg); border-radius: 14px; max-width: 640px; width: 100%;
  padding: 26px 28px; box-shadow: 0 12px 40px rgba(0,0,0,.25); position: relative;
}
.modal .close-x { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.modal .grid2m { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .modal .grid2m { grid-template-columns: 1fr; } }

/* tabs */
.tabbar { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 18px 0 22px; flex-wrap: wrap; }
.tabbar button {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 8px 14px 10px;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabbar button:hover { color: var(--ink); }
.tabbar button.active { color: var(--ink); border-bottom-color: var(--accent); }
[data-tab-panel] { display: none; }
[data-tab-panel].tab-show { display: block; }

/* mobile pass */
@media (max-width: 760px) {
  .wrap { padding: 0 14px 70px; }
  h1 { font-size: 25px; }
  h2 { font-size: 19px; }
  .card { padding: 16px; border-radius: 10px; }
  .modal { padding: 20px 16px; }
}
