/* ========= THEMES =========
   Each theme only changes the variables. Every rule below uses
   var(--something), so swapping variables re-colors the whole site. */

/* Light (default) */
:root {
  --navy: #0B1F3A;  --navy-light: #16325C;  --accent: #2563EB;
  --bg: #FFFFFF;    --surface: #F4F7FB;     --text: #0B1F3A;  --muted: #5A6B85;
  --nav-bg: #0B1F3A; --on-accent: #FFFFFF; --error: #C62828;
  --success: #15803D; --on-success: #FFFFFF; --danger: #C62828; --on-danger: #FFFFFF; --warning: #B45309;
}

/* Navy: midnight blue */
[data-theme="navy"] {
  --bg: #0B1F3A;    --surface: #16325C;     --text: #FFFFFF;  --muted: #A9B8D0;
  --nav-bg: #071428; --accent: #7AABFF; --on-accent: #0B1F3A; --error: #FF9B9B;
  --success: #4ADE80; --on-success: #0B1F3A; --danger: #FF8A8A; --on-danger: #0B1F3A; --warning: #FBBF24;
}

/* Dark: near-black for late nights */
[data-theme="dark"] {
  --bg: #0E1116;    --surface: #1A1F27;     --text: #E6EAF0;  --muted: #8B95A5;
  --nav-bg: #000000; --accent: #7AABFF; --on-accent: #0B1F3A; --error: #FF9B9B;
  --success: #4ADE80; --on-success: #0E1116; --danger: #FF8A8A; --on-danger: #0E1116; --warning: #FBBF24;
}

/* Forest Green: For a Nature themed look */
[data-theme="forest"] {
  --bg: #14301F;  --surface: #1D4A30; --text: #FFFFFF; --muted: #CFE3D6; 
  --nav-bg: #0F2418; --accent: #7BD389; --on-accent: #14301F; --error: #FF9B9B;
  --success: #A7F3B5; --on-success: #14301F; --danger: #FF8A8A; --on-danger: #14301F; --warning: #FCD34D;
}

/* ========= LAYOUT ========= */
body { margin: 0; font-family: system-ui, sans-serif; background: var(--bg); color: var(--text);
       transition: background .25s, color .25s; }
nav { background: var(--nav-bg); color: #fff; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
nav a, nav button { color: #fff; background: none; border: none; font: inherit; cursor: pointer; text-decoration: none; margin-left: 1rem; }
.card { max-width: 400px; margin: 4rem auto; padding: 2rem; background: var(--surface); border-radius: 12px;
        transition: background .25s; }
/* light theme only: the card's pale surface barely shows on white, so give it a navy outline */
[data-theme="light"] .card { border: 2px solid var(--navy); }
input, textarea { width: 100%; padding: .6rem; margin: .3rem 0 1rem; border: 1px solid var(--muted); border-radius: 6px; box-sizing: border-box; }
textarea { display: block; font: inherit; resize: vertical; margin-bottom: 1.5rem; } /* block = drops below its label; extra bottom space before the button */
.btn { background: var(--accent); color: var(--on-accent); border: none; padding: .7rem 1.2rem; border-radius: 6px; cursor: pointer; width: 100%; }
/* links styled as buttons: links are "inline" by default, so padding spills over the text above
   and margin is ignored. inline-block makes the link behave like a real box. */
a.btn { display: inline-block; width: auto; text-decoration: none; color: var(--on-accent);
        outline: 2px solid transparent; outline-offset: 3px;
        transition: transform .15s, outline-color .15s, box-shadow .15s; }
/* hover: lift like the project cards + a bold ring. outline doesn't take up space, so nothing around it shifts */
a.btn:hover { transform: translateY(-2px); outline: 3px solid var(--accent);
              box-shadow: 0 4px 12px rgba(0,0,0,.15); }
/* breathing room above link-buttons; :not(.btn-small) leaves the homepage "Get started" button alone */
a.btn:not(.btn-small) { margin: 1.5rem .75rem 2rem 0; }   /* top, right (gap between side-by-side buttons), bottom (gap before task cards), left */

/* dropdowns: match the text inputs, each on its own line */
select { display: block; width: 100%; padding: .7rem; margin: .3rem 0 1.5rem; box-sizing: border-box;
         border: 1px solid var(--muted); border-radius: 6px; font: inherit; cursor: pointer;
         background: var(--bg); color: var(--text); }
/* tells the browser these themes are dark, so built-in pieces (dropdown menus, the date-picker icon) draw dark too */
[data-theme="navy"], [data-theme="dark"], [data-theme="forest"] { color-scheme: dark; }

/* --- auth + nav additions --- */
a { color: var(--accent); }
nav .brand { font-weight: 700; margin-left: 0; font-size: 1.1rem; margin-right: auto; }   /* auto soaks up the free space, pushing theme + links right */
form.inline { display: inline; }
label { font-size: .9rem; color: var(--muted); }
.card input, .card textarea { background: var(--bg); color: var(--text); }
.error { color: var(--error); font-size: .9rem; margin: -.6rem 0 1rem; }
.muted { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 1.2rem; }

/* --- theme switcher button --- */
nav #theme-toggle { border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: .3rem .8rem; font-size: .9rem; min-width: 5.5rem; }   /* rectangle like .btn; min-width stops the nav shifting as the word changes */
nav #theme-toggle:hover { background: rgba(255,255,255,.12); }


/* ========= TASK CARDS ========= */
.card.wide { max-width: 900px; }
.goal { color: var(--muted); margin-top: -.5rem; }

.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.task-card { position: relative; overflow: hidden;          /* lets the ribbon get clipped at the corner */
             background: var(--bg); border: 1px solid var(--muted); border-radius: 10px;
             padding: 1rem; transition: transform .15s, box-shadow .15s; }
.task-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
a.task-card { display: block; color: inherit; text-decoration: none; }   /* clickable card: undo the global link color + underline */
.task-card h3 { margin: 0 0 .5rem; font-size: 1rem; padding-right: 3.5rem; } /* keeps long titles out from under the ribbon */
.task-card .meta { font-size: .85rem; color: var(--muted); margin: .25rem 0; }

/* urgency ribbon: diagonal across the top-right corner */
.badge { position: absolute; top: 16px; right: -32px; width: 120px;
         transform: rotate(45deg); text-align: center;
         font-size: .7rem; font-weight: 700; padding: .2rem 0; color: #fff; }
.badge.high   { background: #E5484D; }
.badge.medium { background: #F5A524; color: #1a1a1a; }
.badge.low    { background: #30A46C; }

.task-card.status-complete { opacity: .55; }
.task-card.status-complete h3 { text-decoration: line-through; }

/* Changes requested: a yellow-and-black "police tape" band along the card's bottom edge.
   repeating-linear-gradient paints hard-edged diagonal stripes: 0-10px yellow, 10-20px black, repeat.
   The colors are fixed (not theme variables) on purpose: police tape looks the same in every theme,
   just like the urgency ribbon colors. */
.task-card.status-changes { padding-bottom: 1.75rem; }   /* room so the tape never covers the text */
.task-card.status-changes::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: repeating-linear-gradient(-45deg, #FFD500 0 10px, #111111 10px 20px);
  pointer-events: none;
}

/* In review: a faded eye in the bottom-right corner ("someone's looking at it").
   Same stencil trick as the thumbs-up below. Lower opacity than the thumb because review
   cards aren't faded to .55 like complete cards, so this ends up looking about as muted. */
.task-card.status-review::after {
  content: ""; position: absolute; right: .6rem; bottom: .6rem; width: 56px; height: 56px;
  background: var(--text); opacity: .12; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.06 12.35a1 1 0 0 1 0-.7 10.75 10.75 0 0 1 19.88 0 1 1 0 0 1 0 .7 10.75 10.75 0 0 1-19.88 0'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.06 12.35a1 1 0 0 1 0-.7 10.75 10.75 0 0 1 19.88 0 1 1 0 0 1 0 .7 10.75 10.75 0 0 1-19.88 0'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Approved: a faded thumbs-up drawn in the bottom-right corner, the same idea as the viewer ;) watermark.
   It's an SVG outline used as a stencil (mask), filled with the theme's text color,
   so it automatically matches all 4 themes. The whole complete card is already at .55 opacity on top of this. */
.task-card.status-complete::after {
  content: ""; position: absolute; right: .6rem; bottom: .6rem; width: 56px; height: 56px;
  background: var(--text); opacity: .22; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10v12'/%3E%3Cpath d='M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10v12'/%3E%3Cpath d='M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ========= HOME ========= */
.home-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.home-header h1 { margin: 0; }
.btn-small { width: auto; display: inline-block; text-decoration: none; padding: .55rem 1rem; font-weight: 600; }
.card.wide h2 { margin-top: 2rem; }
/* a heading that starts a new section: thin theme-colored line above it, room on both sides */
.card.wide h2.section-title { border-top: 1px solid var(--muted); padding-top: 1.5rem; margin: 1rem 0 1.25rem; }

/* ========= PROJECT LIST ========= */
/* a theme-colored line between projects; "+" means "only a block that comes right after another block",
   so the first project gets no line above it */
.project-block + .project-block { border-top: 1px solid var(--muted); margin-top: 2rem; }

/* ========= PROJECT CARDS ========= */
/* grid-auto-rows: 1fr = every row is as tall as the tallest one, so a card alone on a new row
   (like "+ Create new project") doesn't shrink to fit just its own short content */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
                grid-auto-rows: 1fr; }
.project-card { display: block; color: inherit; text-decoration: none;   /* undo the global a {} link styling */
                background: var(--bg); border: 1px solid var(--muted); border-radius: 10px;
                padding: 1rem; transition: transform .15s, box-shadow .15s, border-color .15s; }
.project-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.15);
                      border-color: var(--accent); }
.project-card h3 { margin: 0 0 .5rem; font-size: 1rem; }
.project-card .goal { margin: 0 0 .5rem; font-size: .9rem; }
.project-card .meta { font-size: .85rem; color: var(--muted); margin: 0; }

/* "+ Create new project": last card in the grid */
.project-card.new { display: flex; flex-direction: column; align-items: center; justify-content: center;
                    text-align: center; font-weight: 600; }
.project-card.new .plus { font-size: 2rem; line-height: 1; margin-bottom: .3rem; color: var(--accent); }
/* ========= FILE UPLOAD: DROP ZONE =========
   .dropzone wraps the cloud icon, the text, and the file input. */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
            gap: .35rem; padding: 2rem 1.25rem 1.5rem; margin: .3rem 0 1.5rem; border-radius: 14px;
            background: var(--bg); transition: background .15s; }

/* The dashed outline. Normal CSS "dashed" borders can't change dash length, so this draws the dashes
   with a tiny SVG used as a stencil (mask) and fills the stencil with a theme color.
   stroke-dasharray='14 9' = 14px dash, 9px gap. stroke-width='5' shows as 2.5px (half sits outside the edge). */
.dropzone::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
                    background: var(--muted); transition: background .15s;
                    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='14' ry='14' fill='none' stroke='black' stroke-width='5' stroke-dasharray='14 9'/%3E%3C/svg%3E");
                            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='14' ry='14' fill='none' stroke='black' stroke-width='5' stroke-dasharray='14 9'/%3E%3C/svg%3E"); }
.dropzone:hover { background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }   /* faint accent tint */
.dropzone:hover::before { background: var(--accent); }                              /* dashes light up */

.dropzone-icon { width: 52px; height: 52px; color: var(--muted); transition: color .15s, transform .15s; }
.dropzone:hover .dropzone-icon { color: var(--accent); transform: translateY(-3px); }
.dropzone-title { margin: 0; font-weight: 600; color: var(--text); }
.dropzone-types { margin: 0 0 .75rem; font-size: .85rem; color: var(--muted); }

/* the real file input is stretched invisibly over the whole zone, so clicking OR dropping a file
   anywhere on the rectangle hits it. opacity 0 hides it but it still works (and is keyboard focusable). */
.dropzone { cursor: pointer; }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
                               opacity: 0; cursor: pointer; }
/* keyboard users: light the dashes up when the hidden input has focus */
.dropzone:focus-within::before { background: var(--accent); }
/* set by dropzone.js while a file is dragged over the zone */
.dropzone.is-dragover { background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.dropzone.is-dragover::before { background: var(--accent); }
/* the chosen file's name, filled in by dropzone.js */
.dropzone-file { margin: .25rem 0 0; font-weight: 600; color: var(--accent); word-break: break-all; }
.dropzone-file:empty { display: none; }


/* ========= HOME HERO ========= */
.hero { text-align: center; }
.hero-title { font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 800; line-height: 1.1; margin: 0;
              color: var(--text); }
.hero-slogan { font-size: 1.25rem; color: var(--muted); margin: .75rem 0 1.5rem;
               letter-spacing: .05em; }

/* ========= VISITOR LANDING PAGE (home page when logged out) =========
   No card: the page itself is the canvas. Everything shares one left edge.
   Wide enough to feel open, capped so lines never stretch across a huge monitor. */
.landing { max-width: 1240px; margin: 0 auto; padding: 5rem 3rem 5rem; }

/* faded keyboard wink ;) in the top-right, same idea as the viewer watermark on project pages.
   ::after draws it with CSS alone; the text color + low opacity make it work in all 4 themes. */
.landing { position: relative; }
.landing::after {
  content: ";)";
  position: absolute; top: 3rem; right: 3rem;
  font-size: clamp(8rem, 22vw, 17rem); font-weight: 800; line-height: 1;
  color: var(--text); opacity: .06;
  pointer-events: none;                        /* clicks pass straight through */
}
.landing > * { position: relative; z-index: 1; }   /* real content stays above the wink */

/* hero: the promise as the headline, a short slogan, one button */
.landing-title { font-size: clamp(2.6rem, 6.5vw, 5rem); font-weight: 800; line-height: 1.05; margin: 0;
                 letter-spacing: -.02em; color: var(--text); max-width: 16ch; }
.landing-slogan { font-size: 1.6rem; font-weight: 600; color: var(--text); margin: 1.1rem 0 2rem; }
.landing .btn-small { font-size: 1.05rem; padding: .8rem 1.7rem; }

/* pitch: left-aligned, full landing width, big text. The lead line is the entry point. */
.pitch { margin: 4.5rem 0 0; font-size: 1.55rem; line-height: 1.6; }
.pitch p { margin: 0 0 1.4rem; color: var(--text); }
.pitch .pitch-lead { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; line-height: 1.15;
                     letter-spacing: -.01em; margin-bottom: 1.2rem; }
.pitch .pitch-closer { margin-bottom: .4rem; font-size: 1.75rem; }
.pitch .pitch-cta { margin-top: 1.6rem; }

/* features: what works today, as tiles in a 2-column grid. Not links, so no hover lift. */
.features-title { font-size: 1.9rem; font-weight: 800; margin: 5rem 0 1.5rem; color: var(--text); }
.feature-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.feature-tile { background: var(--surface); border: 1px solid var(--muted); border-radius: 12px;
                padding: 1.75rem 1.9rem; }
.feature-tile h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.feature-tile p { margin: 0; font-size: 1.1rem; line-height: 1.55; color: var(--muted); }
/* the one future feature spans the full row and is clearly marked */
.feature-tile.is-soon { grid-column: 1 / -1; background: transparent; border-style: dashed; }
.soon-tag { display: inline-block; margin-bottom: .7rem; padding: .2rem .55rem; border: 1px solid var(--accent);
            border-radius: 4px; color: var(--accent); font-size: .85rem; font-weight: 600; }

@media (max-width: 640px) {
  .landing { padding: 2.5rem 1.1rem 3rem; }
  .landing::after { top: 1.5rem; right: 1rem; }
  .landing-slogan { font-size: 1.25rem; }
  .pitch { font-size: 1.15rem; margin-top: 3rem; }
  .pitch .pitch-closer { font-size: 1.3rem; }
  .features-title { margin-top: 3.5rem; }
  .feature-tiles { grid-template-columns: 1fr; }
  .feature-tile { padding: 1.3rem 1.3rem; }
}

/* ========= ALLAUTH PAGES (login, signup, password reset, email verify) =========
   allauth's templates use plain tags with no classes, so these rules target tags
   inside the .auth box instead. Scoped to .auth so nothing else on the site changes. */
.auth h1 { margin-top: 0; }
/* allauth's submit buttons are bare <button>s: give them the same look as .btn */
.auth button { background: var(--accent); color: var(--on-accent); border: none; padding: .7rem 1.2rem;
               border-radius: 6px; cursor: pointer; width: 100%; font: inherit; }
.auth button:hover { filter: brightness(1.1); }
/* "Remember me" checkbox: undo the full-width input rule so it sits next to its label */
.auth input[type="checkbox"] { width: auto; margin: 0 .4rem 0 0; vertical-align: middle; }
/* allauth's help text (e.g. password rules) and form errors */
.auth p span { display: block; font-size: .8rem; color: var(--muted); margin-top: -.6rem; }
.auth .errorlist { color: var(--error); font-size: .9rem; padding-left: 1.1rem; margin: 0 0 .5rem; }

/* ========= INVITES PAGE ========= */
/* Accept/Decline: stacked vertically with a clear gap between them, plus room above and below */
.invite-actions { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0 2.5rem; }
.btn-accept  { background: var(--success); color: var(--on-success); }
.btn-decline { background: var(--danger);  color: var(--on-danger); }
.btn-accept:hover, .btn-decline:hover { filter: brightness(1.1); }

/* ========= PROJECT PAGE ========= */
/* "View only 😉" label for viewers: same quiet style as the "Coming soon*" tags */
.view-only { display: inline-block; margin-bottom: .25rem;
             font-size: .85rem; font-style: italic; color: var(--muted); opacity: .85; }
/* Viewer watermark: a large, faded keyboard wink ;) in the card's upper-right area, behind the content.
   ::after creates an extra "fake" element with CSS alone, so the template only needs the class. */
.card.viewer-mode { position: relative; overflow: hidden; }   /* anchor for the wink; clip it at the card edges */
.card.viewer-mode::after {
  content: ";)";
  position: absolute; top: 1.5rem; right: 10%;   /* upper-right area, pulled in a bit from the edge */
  font-size: clamp(7rem, 20vw, 13rem); font-weight: 800; line-height: 1;   /* smaller to fit that corner */
  color: var(--text); opacity: .06;            /* faded: uses the theme's text color, so it works in all 4 themes */
  pointer-events: none;                        /* clicks pass straight through to links/buttons */
}
.card.viewer-mode > * { position: relative; z-index: 1; }   /* keep the real content above the wink */

/* ========= PITCH PRACTICE ========= */
/* --warning (added to each theme above) is the yellow "almost out of time" cue. */
.practice [hidden] { display: none !important; }
.back-link { display: inline-block; font-size: .9rem; text-decoration: none; margin-bottom: .5rem; }
.practice kbd { font: .8rem/1 ui-monospace, monospace; padding: .15rem .4rem; border: 1px solid var(--muted);
                border-radius: 4px; background: var(--bg); }

/* a quieter, outlined button for secondary actions (Pause, Edit plan, + Add section) */
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--muted); font: inherit; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* --- plan editor: one grid row per section --- */
.plan-head, .plan-row { display: grid; grid-template-columns: 2fr 1.4fr 6rem 2.4rem; gap: .6rem; align-items: center; }
.plan-head { margin: 1.5rem 0 .4rem; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.plan-row { margin-bottom: .6rem; }
.plan-row input, .plan-row select { margin: 0; padding: .6rem; font: inherit; }   /* undo other pages' form spacing; same height for inputs and dropdowns */
.plan-row input.invalid { border-color: var(--danger); outline: 2px solid var(--danger); }
.plan-remove { height: 2.4rem; border: 1px solid var(--muted); border-radius: 6px; background: none;
               color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.plan-remove:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.plan-remove:disabled { opacity: .35; cursor: default; }
#add-section { width: auto; margin-top: .25rem; }
.plan-total { color: var(--muted); margin: 1.25rem 0; }
/* phones: section name gets its own line, the rest sits underneath */
@media (max-width: 600px) {
  .plan-head { display: none; }
  .plan-row { grid-template-columns: 1fr 5rem 2.4rem; margin-bottom: 1.1rem; }
  .plan-row input:first-child { grid-column: 1 / -1; }
}

/* --- run screen: big clock that goes green -> yellow -> red --- */
#run-view { text-align: center; }
.run-step { margin: 1rem 0 .25rem; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.run-title { margin: 0; font-size: 1.8rem; }
.run-speaker { margin: .3rem 0 1rem; color: var(--muted); }
.run-clock { font-size: clamp(4rem, 16vw, 8rem); font-weight: 800; line-height: 1;
             font-variant-numeric: tabular-nums;   /* every digit the same width, so the clock doesn't wiggle */
             color: var(--success); transition: color .3s, opacity .3s; }
.run-target { margin: .4rem 0 0; color: var(--muted); }
.run-cue { min-height: 1.4em; margin: .5rem 0 1rem; font-weight: 600; }
.run-bar { max-width: 520px; height: 10px; margin: 0 auto 1rem; border-radius: 999px; background: var(--bg); overflow: hidden; }
#run-bar-fill { height: 100%; width: 0; background: var(--success); transition: background .3s; }
.run-total { color: var(--muted); font-variant-numeric: tabular-nums; }

#run-view[data-state="warn"] .run-clock,  #run-view[data-state="warn"] .run-cue { color: var(--warning); }
#run-view[data-state="warn"] #run-bar-fill { background: var(--warning); }
#run-view[data-state="over"] .run-clock,  #run-view[data-state="over"] .run-cue { color: var(--danger); }
#run-view[data-state="over"] #run-bar-fill { background: var(--danger); }
#run-view[data-state="over"] .run-clock { animation: rs-pulse 1s ease-in-out infinite; }
#run-view[data-paused] .run-clock { opacity: .4; animation: none; }
@keyframes rs-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { #run-view[data-state="over"] .run-clock { animation: none; } }

.practice-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.practice-actions .btn { width: auto; min-width: 9rem; }

/* --- report --- */
.report-summary { font-size: 1.1rem; }
.report-callout { color: var(--muted); }
.table-scroll { overflow-x: auto; }                /* wide tables scroll sideways on phones instead of breaking the page */
.report-table { width: 100%; border-collapse: collapse; margin: .75rem 0 1.75rem; font-variant-numeric: tabular-nums; }
.report-table th, .report-table td { padding: .55rem .5rem; text-align: left; white-space: nowrap;
                                     border-bottom: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); }
.report-table th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.report-table tr.skipped td { color: var(--muted); font-style: italic; }
.diff-over { color: var(--danger); font-weight: 600; }
.diff-under { color: var(--muted); }
.diff-on { color: var(--success); font-weight: 600; }

/* --- post-pitch notes (private to the writer) --- */
.note-form { margin: 1.5rem 0 .5rem; text-align: left; }
.note-form textarea { margin-bottom: .75rem; }
.note-form .btn { width: auto; }
.practice-notes { margin-top: 2.5rem; padding-top: 1.5rem;
                  border-top: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); }
.practice-note { background: var(--bg); border: 1px solid var(--muted); border-radius: 10px;
                 padding: .9rem 1.1rem; margin-bottom: .75rem; }
.practice-note p { margin: 0; }
.practice-note .meta { margin-top: .4rem; font-size: .8rem; color: var(--muted); }

/* ========= SUBMISSION NOTE ("commit message" shown on the task page) ========= */
.submission-note { background: var(--bg); border: 1px solid var(--muted);
                   border-radius: 8px; padding: .8rem 1rem; margin: .5rem 0 1rem;
                   transition: transform .15s, box-shadow .15s, border-color .15s; }
/* hover: same lift as the task cards, and the whole outline lights up in the accent color */
.submission-note:hover { transform: translateY(-2px); border-color: var(--accent);
                         box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.submission-note p { margin: 0; }
.submission-note .submission-note-label { font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }

/* ========= REVIEW (manager approves or requests changes) ========= */
/* the manager's review box: a plain panel, one small step lighter/darker than the card.
   color-mix blends 5% of the text color into the card color, so it works in all 4 themes. */
.review-box { background: color-mix(in srgb, var(--text) 5%, var(--surface));
              border-radius: 10px; padding: 1rem 1.25rem 1.25rem; margin: 1.5rem 0; }
.card.wide .review-box h2 { margin-top: 0; }
.review-box textarea { margin-bottom: 1rem; }

/* Approve / Request changes: two equal squares side by side.
   aspect-ratio: 1 forces each button to be exactly as tall as it is wide. */
.review-actions { display: grid; grid-template-columns: repeat(2, 8.5rem); gap: 1rem; }
.review-actions .btn { width: auto; aspect-ratio: 1; font: inherit; font-weight: 700; font-size: 1.05rem;
                       border-radius: 10px; padding: .75rem; }

/* the review result everyone sees: same shape as the submission note,
   the left bar color comes from status-{{ task.status }} on the div */
.review-result { background: var(--bg); border: 1px solid var(--muted); border-left: 4px solid var(--accent);
                 border-radius: 8px; padding: .8rem 1rem; margin: 1rem 0; }
.review-result p { margin: 0; }
.review-result .review-result-label { font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
.review-result.status-complete { border-left-color: var(--success); }   /* approved: green */
.review-result.status-changes  { border-left-color: var(--warning); }   /* changes requested: yellow */

/* ========= CONTRIBUTION SUMMARY (project page) ========= */
/* full card width; border-collapse merges neighboring cell borders into one line */
.contrib-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; }
.contrib-table th, .contrib-table td { padding: .7rem .9rem; text-align: left;
                                       border-bottom: 2px solid color-mix(in srgb, var(--muted) 55%, transparent); }
.contrib-table th { font-size: .85rem; color: var(--muted); font-weight: 600; }
/* the number columns: centered under their headings */
.contrib-table th:not(:first-child), .contrib-table td:not(:first-child) { text-align: center; }

/* Click a row to spotlight it. Rows get tabindex="0" in the template, which lets a click give them focus.
   :has(tr:focus) = "the table contains a focused row": then every OTHER row shrinks and fades.
   Clicking anywhere else (or Tab) removes focus, and the table returns to normal. */
.contrib-table tr { transition: transform .15s, opacity .15s, background .15s; }
.contrib-table tr[tabindex] { cursor: pointer; }
.contrib-table tr[tabindex]:focus { outline: 2px solid var(--accent); outline-offset: -2px;
                                    background: color-mix(in srgb, var(--accent) 10%, transparent); }
.contrib-table:has(tr[tabindex]:focus) tr[tabindex]:not(:focus) { transform: scale(.96); opacity: .5; }

/* ========= PRACTICE STATS (personal + team tiles on the practice page) ========= */
/* two separate areas, each a soft panel (same panel recipe as the review box) */
.practice-stats { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2.5rem; }
.stats-area { background: color-mix(in srgb, var(--text) 5%, var(--surface));
              border-radius: 12px; padding: 1rem 1.25rem 1.25rem; }
.card.wide .stats-area h2 { margin: 0 0 .9rem; }

/* the tiles: as many per row as fit, each at least 150px wide */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.stat-tile { background: var(--bg); border: 1px solid var(--muted); border-radius: 10px;
             padding: .9rem 1rem; }
.stat-tile p { margin: 0; }
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1.15; color: var(--text); }
.stat-label { font-size: .85rem; color: var(--muted); margin-top: .3rem !important; }
.stats-area .muted { margin: 0; }

/* police-tape yellow highlight (fixed colors, same as the tape on task cards) */
.tape-highlight { background: #FFD500; color: #111111; padding: 0 .35rem; border-radius: 4px; }

/* ========= PROJECT COLOR PICKER (create project form) ========= */
/* the real radio buttons are hidden; each one sits inside a round swatch you click */
.swatch-label { margin: 0 0 .4rem; }
.swatch-label span { color: var(--muted); font-size: .85rem; }
.swatch-picker { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.5rem; }
/* project page version: smaller swatches in one row under the project name */
.color-form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: -.25rem 0 1rem; }
.color-form .swatch-label { margin: 0; font-size: .85rem; color: var(--muted); }
.color-form .swatch-picker { margin: 0; gap: .45rem; }
.color-form .swatch-dot { width: 22px; height: 22px; border-width: 2px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.swatch-dot { display: block; width: 30px; height: 30px; border-radius: 50%;
              border: 3px solid transparent; outline: 2px solid transparent; transition: transform .15s, outline-color .15s; }
.swatch:hover .swatch-dot { transform: scale(1.1); }
.swatch input:checked + .swatch-dot { outline-color: var(--text); border-color: var(--surface); }   /* ring around the chosen one */
.swatch input:focus-visible + .swatch-dot { outline-color: var(--accent); }
/* same hex values as PROJECT_COLORS in models.py */
.swatch-teal { background: #1D9E75; }  .swatch-coral { background: #D85A30; }
.swatch-purple { background: #7F77DD; } .swatch-pink { background: #D4537E; }
.swatch-blue { background: #378ADD; }  .swatch-amber { background: #EF9F27; }
.swatch-green { background: #639922; } .swatch-gray { background: #888780; }

/* ========= CALENDAR ========= */
.calendar { max-width: 980px; }
.cal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.cal-nav { display: flex; align-items: center; gap: .5rem; }
.card.wide .cal-title { margin: 0 .25rem; font-size: 1.5rem; min-width: 11ch; text-align: center; }
.cal-arrow, .cal-today-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
                             color: var(--text); border: 1px solid var(--muted); border-radius: 8px; transition: border-color .15s, color .15s; }
.cal-arrow { width: 34px; height: 34px; font-size: 1.4rem; line-height: 1; }
.cal-today-btn { height: 34px; padding: 0 .8rem; font-size: .9rem; margin-left: .25rem; }
.cal-arrow:hover, .cal-today-btn:hover { border-color: var(--accent); color: var(--accent); }

/* segmented switches (Day | Week | Month, Mine | Team) */
.cal-switches { display: flex; flex-wrap: wrap; gap: .6rem; }
.seg { display: inline-flex; border: 1px solid var(--muted); border-radius: 8px; overflow: hidden; }
.seg a { padding: .4rem .85rem; font-size: .9rem; color: var(--text); text-decoration: none; transition: background .15s; }
.seg a + a { border-left: 1px solid var(--muted); }
.seg a:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.seg a.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* the grid: 7 columns, a header row of weekday names, then date tiles */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.cal-weekday { font-size: .8rem; font-weight: 600; color: var(--muted); text-align: center; padding-bottom: .1rem; }
.cal-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .35rem;
            aspect-ratio: 1; padding: .5rem .55rem; border-radius: 10px; text-decoration: none; color: var(--text);
            background: var(--bg); border: 1px solid var(--muted);
            transition: transform .15s, box-shadow .15s, border-color .15s; }
.cal-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.15); border-color: var(--accent); }
.cal-tile.is-outside { opacity: .4; }                           /* days from the previous/next month */
.cal-tile.is-today { border: 2px solid var(--accent); }
.cal-date { font-weight: 700; font-size: .95rem; position: relative; z-index: 1; }
.cal-tile.is-today .cal-date { color: var(--accent); }
.cal-dow { display: none; }                                     /* weekday name: only used on phones */

/* week view: taller tiles with task names in the accent color */
.cal-week .cal-tile { aspect-ratio: auto; min-height: 220px; }
.cal-tasks { display: flex; flex-direction: column; gap: .3rem; position: relative; z-index: 1; padding-right: .4rem; margin-top: .2rem; }
.cal-task-name { color: var(--accent); font-weight: 600; font-size: .85rem; line-height: 1.25; overflow-wrap: anywhere; }
.cal-task-name.is-done { opacity: .5; text-decoration: line-through; }

/* project ribbons: thin diagonal tape across the top-right corner, one per project (max 3), stacked */
.cal-ribbons { position: absolute; inset: 0; pointer-events: none; }
.cal-ribbon { position: absolute; right: -30px; width: 92px; height: 6px; transform: rotate(45deg);
              background: var(--ribbon); top: 12px; }
.cal-ribbon:nth-child(2) { top: 26px; }
.cal-ribbon:nth-child(3) { top: 40px; }

/* day view: the due tasks as tiles, then an empty hour grid (meeting times go here later) */
.card.wide .cal-day-heading { margin: 0 0 .75rem; font-size: 1.1rem; }
.cal-day-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.cal-day-task { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .3rem;
                padding: .9rem 2.6rem .9rem 1rem; border-radius: 10px; text-decoration: none; color: var(--text);
                background: var(--bg); border: 1px solid var(--muted); transition: transform .15s, box-shadow .15s, border-color .15s; }
.cal-day-task:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.15); border-color: var(--accent); }
.cal-day-task .cal-task-name { font-size: 1rem; }
.cal-day-task.is-done { opacity: .55; }
.cal-task-meta { font-size: .8rem; color: var(--muted); }
.cal-hours { border-top: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); }
.cal-hour { height: 2.6rem; border-bottom: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
            display: flex; align-items: flex-start; }
.cal-hour span { font-size: .75rem; color: var(--muted); padding: .2rem .5rem 0 0; width: 3.5rem; text-align: right; }

/* coming up: sentences, not rows. Task names in the accent color, overdue ones in police-tape yellow */
.coming-up { margin-top: 2rem; }
.card.wide .coming-up .section-title { margin-top: 0; }
.card.wide .cu-group { margin: 1rem 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cu-item { display: block; padding: .55rem .7rem; margin: 0 -.7rem; border-radius: 8px; color: var(--text); text-decoration: none;
           transition: background .15s; }
.cu-name { color: var(--accent); font-weight: 600; }
.cu-item .tape-highlight { font-weight: 600; }

/* phones: month tiles get smaller; week view turns into a list of days */
@media (max-width: 640px) {
  .cal-grid { gap: .25rem; }
  .cal-tile { padding: .3rem; border-radius: 7px; }
  .cal-date { font-size: .8rem; }
  .cal-ribbon { right: -24px; width: 64px; height: 4px; top: 8px; }
  .cal-ribbon:nth-child(2) { top: 15px; }
  .cal-ribbon:nth-child(3) { top: 22px; }
  .cal-week .cal-grid { grid-template-columns: 1fr; gap: .5rem; }
  .cal-week .cal-weekday { display: none; }
  .cal-week .cal-tile { min-height: 0; padding: .7rem .8rem; }
  .cal-week .cal-dow { display: inline; color: var(--muted); font-weight: 600; }
}

/* ========= IMPORT CALENDARS PAGE ========= */
.feed-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
            background: var(--bg); border: 1px solid var(--muted); border-radius: 10px;
            padding: .9rem 1.1rem; margin-bottom: .75rem; }
.feed-row p { margin: 0; }
.feed-name { font-weight: 700; }
.feed-meta { font-size: .85rem; color: var(--muted); margin-top: .2rem !important; }
.feed-empty { text-align: left; }
.feed-form { max-width: 560px; }
.feed-help { font-size: .85rem; color: var(--muted); margin: -.4rem 0 1.25rem; }
.feed-submit { width: auto; }
.feed-sync { width: auto; padding: .5rem 1rem; min-width: 8.5rem; position: relative; overflow: hidden; }

/* Sync convoy: while syncing, three little cars in project colors drive along a road under the label.
   Hidden until sync_button.js adds .is-syncing to the button. */
.convoy { display: none; }
.feed-sync.is-syncing { cursor: progress; padding-bottom: 1.15rem; }
.feed-sync.is-syncing .convoy { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; }
.convoy-road { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 1px; background: currentColor; opacity: .45; }
.convoy .car { position: absolute; bottom: 5px; left: -18px; width: 14px; height: 7px; border-radius: 2px;
               box-shadow: 0 0 0 1px rgba(255,255,255,.7);   /* thin white outline so cars show on any accent color */
               animation: convoy-drive 2.2s linear infinite; }
.convoy .car::after { content: ""; position: absolute; right: -2px; top: 2px; width: 2px; height: 2px; border-radius: 1px; background: #FAC775; }   /* headlight */
.convoy .car:nth-child(2) { background: #1D9E75; }                            /* teal */
.convoy .car:nth-child(3) { background: #D85A30; animation-delay: .32s; }     /* coral */
.convoy .car:nth-child(4) { background: #EF9F27; animation-delay: .64s; }     /* amber */
@keyframes convoy-drive { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {        /* people who turned off motion: parked cars, no driving */
  .convoy .car { animation: none; left: calc(50% - 6px); }
  .convoy .car:nth-child(2) { left: calc(50% - 22px); }
  .convoy .car:nth-child(4) { left: calc(50% + 10px); }
}
/* Django messages ("Synced 102 events", "Couldn't sync"): plain bordered boxes, colored text by type */
.flash-list { margin: 0 0 1rem; }
.flash { margin: 0 0 .5rem; padding: .7rem 1rem; border: 1px solid var(--muted); border-radius: 8px; background: var(--bg); }
.flash-success { color: var(--success); border-color: var(--success); }
.flash-error { color: var(--error); border-color: var(--error); }

/* ========= IMPORTED CALENDAR EVENTS ON THE CALENDAR =========
   Imported (Canvas) events stay quiet so RS tasks stand out: no accent color, no diagonal. */
/* month: short horizontal lines about 80% down the tile, one per event (max 3) */
.cal-event-lines { position: absolute; left: 18%; right: 18%; top: 78%; display: flex; flex-direction: column; gap: 3px; }
.cal-event-line { display: block; height: 3px; border-radius: 2px; background: var(--muted); opacity: .7; }
/* week + day: muted event names under the task names */
.cal-event-name { color: var(--muted); font-size: .82rem; line-height: 1.25; overflow-wrap: anywhere; margin: 0; }
.cal-day-events { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.5rem; }
.cal-day-events .cal-event-name { font-size: .95rem; }
.cal-event-time { font-weight: 600; margin-right: .5rem; }
/* "Upcoming Canvas tasks": same sentence rows as Coming up, but muted names and the date on the right */
.cu-event { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0; margin-bottom: 0; cursor: default; }
.cu-event:hover { background: none; }
.cu-event-name { color: var(--text); }
.cu-event-when { color: var(--muted); white-space: nowrap; font-size: .9rem; }
@media (max-width: 640px) {
  .cal-event-lines { left: 12%; right: 12%; gap: 2px; }
  .cal-event-line { height: 2px; }
}

/* ========= SMALL TAGS ========= */
/* course tag on imported Canvas events ("MATH M211"): quiet outlined rectangle */
.course-tag { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border: 1px solid var(--muted); border-radius: 4px;
              font-size: .72rem; color: var(--muted); vertical-align: middle; white-space: nowrap; }
/* due-soon badge on task cards: outlined rectangle; overdue uses the police-tape yellow ("needs attention") */
.due-tag { display: inline-block; margin: 0 0 .45rem; padding: .1rem .45rem; border: 1px solid var(--muted); border-radius: 4px;
           font-size: .72rem; font-weight: 700; color: var(--text); }
.due-tag.due-overdue { background: #FFD500; color: #111111; border-color: #FFD500; }

/* ========= DIFFICULTY RATING (imported Canvas events): 3-bar "signal strength" meter =========
   Each bar is a button; filled bars (amber) show the rating. Hover previews by lighting the bar's outline. */
.cal-event-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1rem; }
.rate-meter { display: inline-flex; align-items: flex-end; gap: 3px; }
.rate-bar { width: 9px; padding: 0; border: 1px solid var(--muted); border-radius: 2px; background: transparent; cursor: pointer;
            transition: background .15s, border-color .15s; }
.rate-bar.bar-1 { height: 8px; } .rate-bar.bar-2 { height: 13px; } .rate-bar.bar-3 { height: 18px; }
.rate-bar:hover { border-color: var(--accent); }
/* filled bars are colored by height, like a traffic light: short = green (EZ), middle = yellow, tall = red (Difficult).
   Same colors as the low / medium / high urgency ribbons on task cards. */
.rate-bar.bar-1.is-filled { background: #30A46C; border-color: #30A46C; }
.rate-bar.bar-2.is-filled { background: #F5A524; border-color: #F5A524; }
.rate-bar.bar-3.is-filled { background: #E5484D; border-color: #E5484D; }
.rate-bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rate-label { margin-left: .45rem; font-size: .75rem; color: var(--muted); align-self: center; white-space: nowrap; }
.cu-rate { margin: -.15rem 0 .5rem; }

/* ========= CRUNCH DAYS =========
   Crunch tiles: nothing on the card itself; a red glow AROUND the tile. Neighboring crunch days' glows
   touch across the grid gap, so a whole stretch reads as one red band. */
.cal-tile.is-crunch { box-shadow: 0 0 0 .3rem color-mix(in srgb, var(--danger) 70%, transparent); }
.cal-tile.is-crunch:hover { box-shadow: 0 0 0 .3rem color-mix(in srgb, var(--danger) 85%, transparent), 0 4px 12px rgba(0,0,0,.15); }
/* warning above Coming up: police-tape top edge + big title + busiest day */
.crunch-warnings { display: flex; flex-direction: column; gap: .75rem; margin-top: 2rem; }
.crunch-warning { position: relative; overflow: hidden; background: var(--bg); border: 1px solid var(--muted); border-radius: 10px;
                  padding: 1.35rem 1.2rem .9rem; }
.crunch-warning::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
                          background: repeating-linear-gradient(-45deg, #FFD500 0 8px, #111111 8px 16px); }
.crunch-warning p { margin: 0; }
.crunch-warning-title { font-size: 1.15rem; font-weight: 800; }
.crunch-warning-sub { margin-top: .25rem !important; font-size: .9rem; color: var(--muted); }
.crunch-explainer { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--muted); }

/* Coming up, empty state: big faded wink in the background, message on top */
.cu-empty { position: relative; overflow: hidden; min-height: 9rem; display: flex; align-items: center; justify-content: center;
            border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 10px; }
.cu-empty::before { content: ";)"; position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
                    font-size: 8rem; font-weight: 800; line-height: 1; color: var(--text); opacity: .06; pointer-events: none; }
.cu-empty p { position: relative; margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--muted); }

/* Coming up rows: the task link on the left, a quiet "Hide" button on the right */
.cu-row { display: flex; align-items: center; gap: .5rem; }
.cu-row .cu-item { flex: 1; }
.hide-form { margin: 0; }
.hide-btn { background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--muted);
            font: inherit; font-size: .8rem; padding: .25rem .55rem; cursor: pointer; opacity: .7; }
.hide-btn:hover { opacity: 1; border-color: var(--muted); color: var(--text); }   /* outline only when the cursor is on Hide itself */
/* "2 hidden tasks · Show them again" under the list */
.cu-hidden-note { margin: .75rem 0 0; font-size: .8rem; color: var(--muted); }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }

/* ========= PENDING INVITES (project page, lead/managers only) ========= */
.pending-invites li { margin-bottom: .35rem; }
.pending-invites li > span, .pending-invites form { display: inline-flex; align-items: center; vertical-align: middle; }
.pending-invites form { margin-left: .5rem; }
.invite-role { margin-left: .4rem; padding: 0 .4rem; border: 1px solid var(--muted); border-radius: 4px; font-size: .72rem; color: var(--muted); }

/* ========= PRACTICE SPARKLINE (your last 10 runs) ========= */
.sparkline { margin-top: 1rem; background: var(--bg); border: 1px solid var(--muted); border-radius: 10px; padding: .8rem 1rem .6rem; }
.sparkline p { margin: 0; }
.sparkline-label { font-size: .85rem; font-weight: 700; }
.sparkline-label span { font-weight: 400; color: var(--muted); }
.sparkline svg { display: block; width: 100%; height: 64px; margin: .5rem 0 .25rem; overflow: visible; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-plan { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.spark-dot { stroke: var(--accent); stroke-width: 8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sparkline-range { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }


/* ========= MY AVAILABILITY (week grid of 1-hour tiles) ========= */
.avail-grid { display: grid; grid-template-columns: 3.4rem repeat(7, minmax(0, 1fr)); gap: 4px; user-select: none; touch-action: none; }
.avail-day { text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); padding-bottom: .2rem; }
.avail-hour { font-size: .72rem; color: var(--muted); text-align: right; padding-right: .4rem; align-self: center; }
.avail-cell { position: relative; display: block; height: 30px; cursor: pointer; }
.avail-cell input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.avail-cell span { display: block; height: 100%; border: 1px solid var(--muted); border-radius: 5px; background: var(--bg);
                   transition: background .1s, border-color .1s; }
.avail-cell:hover span { border-color: var(--accent); }
.avail-cell input:checked + span { background: var(--accent); border-color: var(--accent); }
.avail-cell input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.avail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1.25rem; }
.avail-save { width: auto; }
.avail-count { font-size: .85rem; color: var(--muted); }

/* ========= BEST TIMES TO MEET (project page) ========= */
.meet-card { margin: 2rem 0 .5rem; background: color-mix(in srgb, var(--text) 5%, var(--surface)); border-radius: 12px; padding: 1.1rem 1.25rem 1rem; }
.meet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: .9rem; }
.card.wide .meet-head h2 { margin: 0; }
.meet-length { display: flex; align-items: center; gap: .5rem; margin: 0; }
.meet-length label { margin: 0; }
.meet-length select { width: auto; margin: 0; padding: .35rem .5rem; }
.meet-length-text { font-size: .85rem; color: var(--muted); }
.meet-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.meet-tile { background: var(--bg); border: 1px solid var(--muted); border-radius: 10px; padding: .85rem 1rem; }
.meet-tile.is-everyone { border: 2px solid var(--success); }
.meet-tile p { margin: 0; }
.meet-when { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.meet-time { font-size: 1.35rem; font-weight: 800; margin: .15rem 0 .2rem !important; }
.meet-who { font-size: .85rem; font-weight: 700; }
.meet-tile.is-everyone .meet-who { color: var(--success); }
.meet-names { font-size: .8rem; color: var(--muted); margin-top: .15rem !important; }
.meet-empty { text-align: left; margin: 0; }
.meet-note { margin: .85rem 0 0; font-size: .8rem; color: var(--muted); }

/* ========= DAY VIEW: free hours + team meeting ideas ========= */
.cal-hour.is-free { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cal-hour { gap: .5rem; align-items: center; }
.meet-idea { display: inline-block; margin: .2rem 0; padding: .15rem .55rem; border: 1px solid var(--ribbon); border-radius: 5px;
             font-size: .78rem; font-weight: 700; color: var(--text); text-decoration: none; background: var(--bg); }
.meet-idea:hover { background: color-mix(in srgb, var(--ribbon) 18%, var(--bg)); }
.cal-hours-key { margin: .5rem 0 0; font-size: .78rem; color: var(--muted); }
.key-free { display: inline-block; width: .8rem; height: .8rem; vertical-align: -1px; border-radius: 2px;
            background: color-mix(in srgb, var(--accent) 25%, transparent); border: 1px solid var(--accent); }

@media (max-width: 640px) {
  .avail-grid { grid-template-columns: 2.6rem repeat(7, minmax(0, 1fr)); gap: 3px; }
  .avail-cell { height: 26px; }
}


/* ========= MOBILE NAV =========
   phones: row 1 = RoadStation + theme button, row 2 = the links spread evenly */
@media (max-width: 640px) {
  nav { flex-wrap: wrap; padding: .75rem 1rem; row-gap: .6rem; }
  .nav-links { width: 100%; display: flex; justify-content: space-between; align-items: center; }
  .nav-links a, .nav-links button { margin-left: 0; }
  .nav-links form.inline { display: flex; }
}

/* ========= TEAM BOARD ========= */
.board-btn { position: relative; }
/* red unread dot in the button's top-right corner */
.unread-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%;
              background: var(--danger); border: 2px solid var(--surface); }
.post-form { margin: 1.25rem 0 2rem; }
.post-form textarea { margin-bottom: .75rem; }
.post-form-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.post-file { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.post-file input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; margin: 0; cursor: pointer; }
.post-file-btn { padding: .45rem .85rem; border: 1px solid var(--muted); border-radius: 6px; font-size: .85rem; color: var(--text); }
.post-file:hover .post-file-btn { border-color: var(--accent); color: var(--accent); }
.post-file-name { font-size: .8rem; color: var(--muted); word-break: break-all; }
.post-submit { width: auto; padding: .55rem 1.6rem; }
.posts { display: flex; flex-direction: column; gap: .85rem; }
.post { background: var(--bg); border: 1px solid var(--muted); border-radius: 10px; padding: .9rem 1.1rem; }
.post-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .45rem; }
.post-author { font-weight: 700; }
.post-date { font-size: .8rem; color: var(--muted); }
.post-body { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.post-attachment { margin: .6rem 0 0; font-size: .85rem; }
.post-actions { display: flex; gap: .4rem; margin-top: .6rem; }
.post-action { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: .2rem .55rem;
               font: inherit; font-size: .8rem; color: var(--muted); text-decoration: none; cursor: pointer; }
.post-action:hover { border-color: var(--muted); color: var(--text); }
.post-action.danger:hover { border-color: var(--danger); color: var(--danger); }
.post-edit-file-label { margin: 0 0 .3rem; font-size: .9rem; color: var(--muted); }
.post-edit-file { margin-bottom: 1rem; font-size: .9rem; }
.post-edit-file input[type=file] { width: auto; margin: .4rem 0 0; border: none; padding: 0; }
.post-edit-file input[type=checkbox] { width: auto; margin: 0 .3rem 0 .6rem; vertical-align: middle; }
.post-cancel { font-size: .9rem; }
/* the dot also sits in the corner of project cards (home + project list) */
.project-card { position: relative; }
.unread-dot.inline { position: static; display: inline-block; vertical-align: middle; margin-left: .3rem; border-color: transparent; }

/* project list: the project name is a link to its page; looks like a heading until you hover */
.project-name-link { color: inherit; text-decoration: none; }
.project-name-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }


/* ========= PROFILE ========= */
/* setup: each question is a row of square-ish tiles; the real radio/checkbox is hidden inside the tile */
.profile-setup .pq { border: none; padding: 0; margin: 0 0 1.75rem; }
.pq-title { font-weight: 700; font-size: 1.05rem; margin-bottom: .6rem; padding: 0; }
.pq-hint { margin-left: .4rem; font-size: .75rem; font-weight: 400; color: var(--muted); }
.pq-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.pq-tiles.pq-wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pq-tile { position: relative; display: flex; align-items: center; min-height: 3.4rem; cursor: pointer; }
.pq-tile input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pq-tile span { width: 100%; height: 100%; display: flex; align-items: center; padding: .7rem .9rem; box-sizing: border-box;
                border: 1px solid var(--muted); border-radius: 10px; background: var(--bg); color: var(--text);
                font-size: .92rem; line-height: 1.3; transition: border-color .15s, background .15s; }
.pq-tile:hover span { border-color: var(--accent); }
.pq-tile input:checked + span { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg)); font-weight: 700; }
.pq-tile input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pq-time input { width: auto; min-width: 10rem; }
.pq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.pq-save { width: auto; padding: .7rem 1.8rem; }
.pq-privacy { margin: 1rem 0 0; font-size: .8rem; color: var(--muted); }
/* profile page */
.profile-tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.profile-value { margin: .3rem 0 0; font-weight: 700; line-height: 1.35; }
.profile-tiles .stat-label { margin-top: 0 !important; }
.profile-edit { margin-top: 1rem; }
.shared-tag { display: inline-block; margin-left: .3rem; padding: 0 .35rem; border: 1px solid var(--muted); border-radius: 4px;
              font-size: .68rem; font-weight: 400; color: var(--muted); }
.shared-tag.on { border-color: var(--success); color: var(--success); }
.security-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem;
                background: var(--bg); border: 1px solid var(--muted); border-radius: 10px; padding: .9rem 1.1rem; }
.security-row p { margin: 0; }
/* project page: teammates' role + strengths next to their name */
.member-tag { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border: 1px solid var(--muted); border-radius: 4px;
              font-size: .72rem; font-weight: 400; color: var(--muted); vertical-align: middle; }
.member-tag.role { border-color: var(--accent); color: var(--accent); }
