/* Rock by Rock app styles. Palette from ~/Documents/rbr-team-zone/templates/journal.css and the chat
   renderer handoff. Raleway only; flat colors; pill buttons; orange only for kickers and the primary CTA. */
@font-face { font-family: "Raleway"; src: url("/static/fonts/Raleway-Variable.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --navy: #002b54; --blue: #2eaef1; --blue-dk: #1d87c4; --orange: #f18a31; --orange-dk: #c46918;
  --purple: #8a31f1; --teal: #2ef1d3; --teal-dk: #1bb8a3; --gray: #e2e8ee; --gray-txt: #5a6a7a;
  --light: #f4f8fc; --blue-t: #e8f4fd; --orange-t: #fef4ea; --teal-t: #e1fdf8; --body: #1f3a57;
  --red: #b42318; --red-t: #fdecea; --green: #0d7a6c; --green-t: #e1fdf8;
  --purple-dk: #6a2bc4; --purple-dk2: #5420a3; --purple-t: #f3eafe; --muted: var(--gray-txt);
  --line: #c9d3e0; --line-dk: #9fb3c6; --blue-tab: #bfe6fb; --blue-tab-hover: #9fdaf8;  /* D-139 item 11 */
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Raleway", system-ui, sans-serif; color: var(--body); background: var(--light);
  font-size: 15px; line-height: 1.5; }
a { color: var(--blue-dk); }
h1, h2, h3 { color: var(--navy); font-weight: 800; line-height: 1.2; }
h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 22px 0 8px; }
h3 { font-size: 16px; margin: 16px 0 6px; }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-dk); }
.muted { color: var(--gray-txt); }
.small { font-size: 13px; }

/* Header */
.topbar { background: #fff; border-bottom: 1px solid var(--gray); padding: 10px 24px; display: flex;
  align-items: center; gap: 16px; }
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy);
  font-weight: 800; font-size: 17px; }
.topbar .brand img { height: 30px; }
.topbar .spacer { flex: 1; }
.topbar form { margin: 0; }
.status-strip { font-size: 12px; color: var(--gray-txt); }
.status-strip b { color: var(--navy); }
.status-strip .plan-today { cursor: help; }
.status-strip .plan-today.heavy b { color: var(--orange); }

/* Tabs */
.project-head { background: #fff; padding: 14px 24px 0; border-bottom: 1px solid var(--gray); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.tabs a { padding: 8px 14px; border-radius: 10px 10px 0 0; text-decoration: none; color: var(--navy);
  font-weight: 700; font-size: 14px; border: 1px solid transparent; border-bottom: none; }
.tabs a:hover { background: var(--blue-t); }
.tabs a.active { background: var(--light); border-color: var(--gray); }
.tabs a .lock { font-size: 11px; color: var(--green); margin-left: 4px; }
.tabs.tools a { font-weight: 600; font-size: 13px; color: var(--gray-txt); }
.tabs.tools a.active { color: var(--navy); }
.menu-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 6px; margin-top: 10px; }
.menu-row .tabs { margin-top: 0; }
.menu-label { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-dk);
  padding: 0 4px 10px 0; }
.menu-row > .menu-label { min-width: 120px; }
.tabs .tab-later { padding: 8px 14px; font-size: 13px; color: var(--gray); cursor: default; }
.minor-row .tabs a { font-size: 12px; padding: 6px 10px; }

/* D-121 project menu: Path switch, then folder tabs (one per phase) in RBR light blue; the open tab joins its menu. */
.path-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.path-switch form { margin: 0; }
.path-label { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-dk);
  margin-right: 4px; }
.path-btn { font: inherit; font-weight: 700; font-size: 13px; padding: 5px 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--blue); background: #fff; color: var(--navy); }
.path-btn:hover { background: var(--blue-t); }
.path-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.folders { margin-top: 12px; }
.folder-tabs { display: flex; flex-wrap: wrap; align-items: flex-end; padding-left: 14px; }
.folder-tab { --tab: var(--blue-tab); position: relative; display: inline-block; padding: 9px 26px 8px; margin: 0 14px 0 0;
  text-decoration: none; font-weight: 800; font-size: 14px; color: var(--navy); background: var(--tab);
  border-radius: 16px 16px 0 0; }
/* Folder-tab shoulders: a small curve flaring out at each bottom corner, in the tab's own color. */
.folder-tab::before, .folder-tab::after { content: ""; position: absolute; bottom: 0; width: 12px; height: 12px;
  pointer-events: none; }
.folder-tab::before { left: -12px; background: radial-gradient(circle at 0 0, transparent 11.5px, var(--tab) 12px); }
.folder-tab::after { right: -12px; background: radial-gradient(circle at 100% 0, transparent 11.5px, var(--tab) 12px); }
.folder-tab:hover { --tab: var(--blue-tab-hover); }
.folder-tab.open { --tab: var(--blue); z-index: 1; padding-top: 11px; }
.folder-tab:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }
.folder-menu { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: var(--blue);
  border-radius: 0 12px 0 0; }
.folder-menu[hidden] { display: none; }
.folder-menu a { padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 13px;
  color: var(--navy); background: #fff; }
.folder-menu a:hover { background: var(--blue-t); }
.folder-menu a.active { background: var(--navy); color: #fff; }
.folder-menu a .lock { font-size: 11px; color: var(--green); margin-left: 4px; }
.folder-menu a.active .lock { color: var(--teal); }
.folder-menu .tab-later { padding: 6px 14px; font-size: 13px; font-weight: 700; color: rgba(0, 43, 84, .45); cursor: default; }
@media (max-width: 760px) { .folder-tab { padding: 8px 14px 7px; margin-right: 12px; font-size: 13px; } }

/* Every page uses the whole window (Jeff, 2026-11-08: "every page to use full page and adjust to size of window"). */
main { padding: 20px clamp(16px, 2.5vw, 40px) 60px; max-width: none; }
.card { background: #fff; border: 1px solid var(--gray); border-radius: 16px; padding: 18px 20px; margin: 14px 0;
  box-shadow: 0 1px 3px rgba(0, 43, 84, .06); }
.card.locked { background: var(--light); }
.field-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.field-head h3 { margin: 0; }
.field-help { font-size: 13px; color: var(--gray-txt); margin: 2px 0 8px; }
.field-purpose { font-size: 14px; color: var(--body); margin: 4px 0 4px; }

input[type=text], input:not([type]), input[type=email], input[type=password], select, textarea {
  font-family: inherit; font-size: 14px; color: var(--navy); background: var(--light); border: 1px solid var(--gray);
  border-radius: 12px; padding: 9px 12px; width: 100%; }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
textarea.tall { min-height: 260px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; background: #fff; }
textarea[readonly], input[readonly] { background: #fff; color: var(--body); }

.btn { display: inline-block; font-family: inherit; font-size: 14px; font-weight: 700; border-radius: 999px;
  padding: 8px 18px; border: 1px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer;
  text-decoration: none; }
.btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--gray); }
.btn.ghost:hover { background: var(--blue-t); border-color: var(--gray); color: var(--navy); }
.btn.cta { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.cta:hover { background: var(--purple); border-color: var(--purple); color: #fff; }  /* Jeff, 2026-11-04 */
.btn.purple { background: var(--purple); border-color: var(--purple); color: #fff; }
/* D-139 items 5-6: every button that calls Granite is .btn.ai: purple, with ✨ added here (never typed in the label). */
.btn.ai { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.ai:hover { background: var(--purple-dk); border-color: var(--purple-dk); color: #fff; }
.btn.ai::before { content: "✨ "; }
/* Deletes: red outline (D-139 item 3). */
.btn.danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { font-size: 12px; padding: 5px 12px; }
/* Blue buttons: white text; orange on hover (Jeff, 2026-11-04). */
.btn.regen { color: #fff; }
.btn.regen:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.notice { border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-weight: 600; }
.notice.ok { background: var(--green-t); color: var(--green); }
.notice.err { background: var(--red-t); color: var(--red); }
.notice.warn { background: var(--orange-t); color: var(--orange-dk); }

.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 9px; }
.badge.block { background: var(--red-t); color: var(--red); }
.badge.flag { background: var(--orange-t); color: var(--orange-dk); }
.badge.pass { background: var(--green-t); color: var(--green); }
.badge.stale { background: var(--orange-t); color: var(--orange-dk); }
.badge.approved { background: var(--green-t); color: var(--green); }
.badge.pending { background: var(--blue-t); color: var(--blue-dk); }

table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--gray); padding: 6px 8px; text-align: left; vertical-align: top; }
table.grid th { color: var(--navy); font-weight: 800; background: var(--light); }

/* Rendered Markdown inside cards */
.md table { border-collapse: collapse; margin: 8px 0; font-size: 13px; width: 100%; max-width: 100%; }
.md th, .md td { border: 1px solid var(--gray); padding: 4px 8px; vertical-align: top;
  white-space: normal; overflow-wrap: break-word; }
/* Number columns stay narrow (header wraps), so text columns get the width; nothing is hidden or cut off. */
.md th.num, .md td.num { width: 1%; text-align: center; overflow-wrap: normal; word-break: normal; }
.md th.num { min-width: 4.5em; max-width: 9em; }
.md th { background: var(--light); color: var(--navy); overflow-wrap: normal; }
details > summary { cursor: pointer; color: var(--blue-dk); font-weight: 700; font-size: 13px; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  .topbar .spacer { display: none; }
  /* Narrow window (17 Nov 2026, Jeff: "why is the rbr logo touching the granite character?"): the RBR logo stays on
     the first row at the right, with room around the robot; the account links wrap below. */
  .topbar .brand { order: 0; }
  .topbar .brand img.geode-bot { height: 46px; margin: 0; }
  .topbar .brand .geode { font-size: 22px; }
  .topbar .rbr-logo-top { order: 1; height: 22px; margin-left: auto; }
  .topbar .acct-menu { order: 2; width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .project-head, main { padding-left: 16px; padding-right: 16px; }
}

/* Open team-comment counts on tabs */
.tab-count { display: inline-block; background: var(--orange-t); color: var(--orange-dk); border-radius: 999px;
  padding: 0 6px; font-size: 10px; font-weight: 800; margin-left: 4px; vertical-align: 1px; }

.stale-dot { color: var(--orange); font-weight: 800; }

/* Loading state while the next page loads */
#page-loading { position: fixed; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; z-index: 99;
  font-size: 0; background: var(--blue-t); }
#page-loading::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%;
  background: var(--blue); animation: rbr-load 1s ease-in-out infinite; }
@keyframes rbr-load { to { left: 100%; } }
body.is-loading .tabs a.active { opacity: .6; }

/* D-93 coaching tips: one color per coach */
.coach-tip { display: inline-block; }
.coach-btn { font-family: inherit; font-weight: 700; font-size: 13px; color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.coach-mission .coach-btn { background: var(--navy); }
.coach-problem-solving .coach-btn { background: var(--orange); }
.coach-leadership .coach-btn { background: var(--purple); }
.coach-love-of-learning .coach-btn { background: var(--blue); }
.coach-btn:hover { filter: brightness(1.1); }
.coach-pop { display: block; margin-top: 6px; background: #fff; border: 2px solid currentColor; border-radius: 12px; padding: 8px 12px; color: var(--body); }
.coach-mission .coach-pop { border-color: var(--navy); }
.coach-problem-solving .coach-pop { border-color: var(--orange); }
.coach-leadership .coach-pop { border-color: var(--purple); }
.coach-love-of-learning .coach-pop { border-color: var(--blue); }

.badge.act-type { background: var(--blue-t); color: var(--blue-dk); text-transform: none; letter-spacing: 0; font-weight: 700; margin-left: 6px; }
/* D-112: design-tab suggestions shown beside the designer's text */
.dc-suggest { border: 1px dashed var(--purple); border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: var(--purple-t); }
.dc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .dc-cols { grid-template-columns: 1fr; } }
.dc-check-out { margin: 6px 0; }
/* Template panel and template mode on design-tab sections (Jeff 2026-11-06). */
.dc-tpl { margin: 6px 0; }
.dc-tpl > summary { display: inline-block; cursor: pointer; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; }
.dc-tpl[open] > summary { background: var(--light); }
.dc-tpl-box { border: 1px dashed var(--line-dk); border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: var(--light); }
.dc-tpl-mine { margin-top: 8px; }
.dc-tpl-mine > summary { cursor: pointer; color: var(--blue-dk); }
/* wide tables scroll inside their box instead of running off the page */
.dc-tpl-box .md, .dc-suggest .md, .field-view.md { overflow-x: auto; max-width: 100%; }
.dc-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dc-cols > div { min-width: 0; }

/* Built-in icons (app/icons.py) on every page; pages.css adds the print spacing. */
.rbr-ico { display: inline-block; vertical-align: -0.2em; flex: none; }
.rbr-ico .ico2 { fill: var(--ico2, var(--blue)); opacity: var(--ico2-o, .85); }
/* Project vs shared tabs (Jeff, 2026-11-08) */
.shared-div { align-self: center; font-size: 12px; font-weight: 800; color: var(--gray-txt); margin: 0 16px 0 14px; padding-left: 14px;
  border-left: 2px solid var(--line-dk); white-space: nowrap; }
.shared-div.sm { color: #fff; border-left-color: rgba(255,255,255,.6); margin-left: 8px; }
.folder-tab.shared:not(.open) { background: var(--light); outline: 1.5px dashed var(--blue-tab-hover); outline-offset: -3px; }
.folder-menu a.shared:not(.active) { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.85); }
.shared-note { background: var(--blue-t); border: 1px solid var(--blue-tab); color: var(--navy); border-radius: 12px; padding: 8px 14px; margin: 0 0 12px; font-size: 14px; }

/* Granite header and footnote (Jeff, 2026-11-08). */
.topbar .brand img.geode-bot { height: 62px; width: auto; margin: -10px 0; }
.topbar .brand .geode { font-size: 28px; font-weight: 800; color: var(--purple-dk); letter-spacing: .01em; line-height: 1.1; }
.topbar .rbr-logo-top { height: 32px; width: auto; margin-left: 16px; }
.topbar .brand .geode-sub { font-size: 15px; font-weight: 600; color: var(--gray-txt); }
.proj-switch { flex-wrap: wrap; }
.proj-switch .who-form { margin: 0 0 0 auto; gap: 6px; align-items: center; }
.proj-switch .todo-pill { padding: 3px 10px; border-radius: 999px; background: var(--light); text-decoration: none; }
.site-foot { margin: 40px 24px 18px; padding-top: 10px; border-top: 1px solid var(--gray); color: var(--gray-txt); font-size: 12px; }
.site-foot b { color: var(--navy); }
.site-foot .plan-today { cursor: help; }
.site-foot .plan-today.heavy b { color: var(--orange); }

/* "← Back to <project>" on pages outside a project. */
.back-bar { padding: 10px 24px 0; }
.back-link { display: inline-block; font-weight: 800; font-size: 15px; color: #fff; background: var(--purple-dk); padding: 8px 16px;
  border-radius: 999px; text-decoration: none; }
.back-link:hover { background: var(--purple-dk2); color: #fff; }

/* Granite's generators beside the name (Jeff, 2026-11-08): Project Generator in light purple; the coming ones in
   orange, not clickable. */
.topbar .gens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: 14px; }
.topbar .gen { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; font-size: 13px;
  font-weight: 700; text-decoration: none; white-space: nowrap; }
.topbar .gen.on { background: #ece0fd; color: #5b21b6; border: 1.5px solid #c9a8f5; }
.topbar .gen.on:hover { background: #e2d0fc; }
/* A generator you can open but aren't in (17 Nov 2026: Math is live): the same pill, light blue. */
.topbar a.gen:not(.on) { background: var(--blue-t); color: var(--navy); border: 1.5px solid var(--blue-tab); }
.topbar a.gen:not(.on):hover { background: var(--blue-tab); }
.topbar .gen.soon { background: #fde3c8; color: #8f4a0a; border: 1.5px solid #f7c18f; cursor: default; opacity: .9; }
/* Narrower windows (Jeff, 17 Nov 2026: "in this mode the project math ela buttons are not visible"): the generator
   buttons wrap onto their own row under the logo instead of disappearing. */
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; }
  .topbar .gens { order: 10; width: 100%; margin-left: 0; }
}

/* Show / Hide beside password boxes (17 Nov 2026) */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 64px; }
.pw-show { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none;
  color: var(--blue-dk); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 6px; }
.pw-show:hover { text-decoration: underline; }
