:root {
  color-scheme: light;
  --paper: #f6f8f7;
  --surface: #fff;
  --ink: #142e29;
  --muted: #52665f;
  --line: #d9e4df;
  --accent: #176650;
  --wash: #e7f3ed;
  --yellow: #f5ead1;
  font: 16px/1.5 "Avenir Next", Avenir, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, select, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #248e72; outline-offset: 3px; }
button {
  background: var(--surface);
  border: 1px solid #bccdc6;
  color: var(--ink);
  border-radius: 7px;
  padding: .55rem .85rem;
  font-size: .875rem;
  font-weight: 650;
  min-height: 42px;
  cursor: pointer;
}
button:hover { background: var(--wash); border-color: var(--accent); }
button:disabled { opacity: .65; cursor: wait; }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.primary:hover { background: #0d513e; color: white; }
.quiet { background: transparent; border-color: transparent; }
.skip { position: absolute; left: 1rem; top: -5rem; }
.skip:focus { top: .5rem; z-index: 3; background: white; padding: .75rem; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.18; text-wrap: balance; }
p { color: var(--muted); max-width: 70ch; }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.mast, main { width: min(1200px, 100%); margin: auto; padding-inline: clamp(1rem, 4vw, 3rem); }
.mast { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); font-size: 1.1rem; white-space: nowrap; }
.brand:hover { color: var(--accent); }
.mark { width: 32px; height: 32px; background: var(--accent); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex: none; }
.mark b { width: 3px; background: #e0f7eb; height: 9px; border-radius: 3px; }
.mark b:nth-child(2) { height: 17px; }
.mark b:nth-child(3) { height: 12px; }
.session { display: flex; align-items: center; gap: .65rem; font-size: .85rem; min-width: 0; }
.identity { overflow-wrap: anywhere; }
.demo { white-space: nowrap; background: var(--yellow); padding: .15rem .5rem; border-radius: 5px; color: #643f0e; }
main { padding-bottom: 3rem; }
.workspace-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.project-picker { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.project-picker label { color: var(--muted); }
select { min-width: 0; max-width: 100%; padding: .5rem .6rem; font-size: .9rem; }
input, textarea, select { color: var(--ink); background: white; border: 1px solid #aabeb4; border-radius: 7px; }
.project-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin: 2.15rem 0; }
.project-heading div { min-width: 0; }
.project-heading button { flex: none; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 740; letter-spacing: -.055em; }
.project-heading p, .task-heading p { margin-top: .45rem; white-space: pre-wrap; }
.layout { display: grid; grid-template-columns: minmax(220px, .78fr) minmax(0, 2.22fr); gap: clamp(1rem, 3vw, 2rem); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.tasks { padding: .6rem; }
.tasks h2 { font-size: 1rem; display: flex; align-items: center; justify-content: space-between; padding: .8rem .7rem; }
.tasks h2 span { font-size: .76rem; font-weight: 650; color: var(--muted); }
.tasks nav { display: grid; gap: .3rem; }
.tasks a { display: grid; gap: .35rem; justify-items: start; color: var(--ink); text-decoration: none; border-radius: 6px; border-left: 3px solid transparent; padding: .7rem .65rem; overflow-wrap: anywhere; font-size: .91rem; }
.tasks a:hover, .tasks a[aria-current] { background: var(--wash); }
.tasks a[aria-current] { border-left-color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; border-radius: 20px; padding: .2rem .6rem; background: #edf1ef; color: #475b52; font-size: .72rem; font-weight: 680; white-space: nowrap; }
.status i { border-radius: 100%; width: 6px; height: 6px; background: currentColor; }
.status.open, .status.accepted { background: var(--wash); color: #185841; }
.status.closed { background: var(--yellow); color: #643f0e; }
.task-heading { margin: 0 0 1rem; }
.task-heading h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -.035em; }
.round { padding: clamp(1rem, 3vw, 1.6rem); border-top: 4px solid var(--accent); }
.round-head, .submission-label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
h3 { font-size: 1.15rem; }
.submission { margin: 1.35rem 0 .5rem; }
.submission-label { font-size: .9rem; }
.submission-label span, .history-metric { color: var(--muted); font-variant-numeric: tabular-nums; }
progress { width: 100%; height: .65rem; margin-top: .6rem; border: 0; border-radius: 40px; background: #e2ebe6; appearance: none; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #e2ebe6; border-radius: 40px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 40px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 40px; }
.privacy, .round-actions span, .roster, .history-metric { font-size: .86rem; }
.round-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; margin-top: 1rem; }
.roster, .invitations { list-style: none; padding: 0; margin: 1rem 0 0; }
.roster li, .invitations li { border-top: 1px solid var(--line); padding: .55rem 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem; overflow-wrap: anywhere; }
.roster li span:last-child { color: var(--muted); }
.roster li span.received { color: var(--accent); font-weight: 650; }
.invitations li button { flex: none; }
.history { margin-top: 1.2rem; }
.history h3 { padding: 1rem 1.25rem; }
.history ol { list-style: none; margin: 0; padding: 0; }
.history a { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(6rem, auto) auto; align-items: center; gap: .75rem; padding: .8rem 1.25rem; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .88rem; }
.history a:hover, .history a[aria-current] { background: #f0f7f3; }
.history li:last-child a { border-radius: 0 0 12px 12px; }
.history small { display: block; color: var(--muted); }
.history-metric { text-align: right; }
.chevron { color: var(--accent); font-size: 1.25rem; }
.statistics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1rem 0; }
.statistics div { background: var(--wash); border-radius: 8px; padding: 1rem; }
dt { color: #2c5b4c; font-size: .83rem; }
dd { margin: 0; font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 730; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
dd small { font-size: .8rem; font-weight: 500; white-space: nowrap; }
.submission-confirm { margin: 1rem 0; background: var(--wash); border-radius: 6px; padding: .65rem .8rem; color: #185841; }
.empty { margin-top: 2rem; padding: clamp(1rem, 5vw, 3rem); }
.empty button, .empty-round button { margin-top: 1rem; }
.empty p, .empty-round p { margin-top: .65rem; }
.welcome { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(1rem, 6vw, 5rem); margin: clamp(2rem, 10vh, 7rem) auto; max-width: 880px; }
.intro .mark { width: 48px; height: 48px; margin-bottom: 1rem; }
.welcome p { margin-top: .65rem; }
.login { padding: clamp(1rem, 3vw, 1.8rem); }
.login form { margin-top: 1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin-block: 1rem; }
label { font-size: .88rem; font-weight: 650; }
label small { color: var(--muted); font-weight: 500; }
label :is(input, textarea) { display: block; width: 100%; padding: .6rem .7rem; margin: .3rem 0 .65rem; min-height: 42px; }
textarea { resize: vertical; }
.estimate { margin-top: 1rem; max-width: 18rem; }
.error { color: #a12728; font-size: .86rem; margin: .45rem 0; }
.error:empty { margin: 0; }
dialog { width: min(520px, calc(100% - 2rem)); max-height: 90dvh; color: var(--ink); background: white; padding: 1.25rem; border: 1px solid var(--line); border-radius: 12px; overscroll-behavior: contain; }
dialog::backdrop { background: #102d26a0; }
.dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.dialog-head h2 { font-size: 1.35rem; }
.dialog-actions { justify-content: flex-end; flex-wrap: wrap; margin: 1rem 0 0; }
.icon { min-width: 42px; font-size: 1.25rem; }
fieldset { border: 1px solid var(--line); border-radius: 7px; }
.check { display: flex; align-items: center; gap: .6rem; min-height: 42px; }
.check input { width: 18px; min-height: auto; height: 18px; margin: 0; accent-color: var(--accent); }
#notice:not(:empty) { position: fixed; bottom: max(1rem, env(safe-area-inset-bottom)); right: 1rem; background: var(--ink); color: white; padding: .7rem 1rem; border-radius: 7px; max-width: calc(100% - 2rem); z-index: 2; }
@media (max-width: 740px) {
  .welcome, .layout { grid-template-columns: minmax(0, 1fr); }
  .project-heading { align-items: start; flex-direction: column; margin-block: 1.35rem; }
  .tasks nav { grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); }
  .tasks a { align-content: start; }
}
@media (max-width: 470px) {
  .identity { display: none; }
  .mast { gap: .4rem; }
  .session { gap: .2rem; }
  .workspace-bar { flex-wrap: wrap; }
  .project-picker { width: 100%; }
  .statistics { grid-template-columns: 1fr; }
  .history a { grid-template-columns: minmax(0, 1fr) auto; gap: .35rem; }
  .history-metric { text-align: left; }
  .chevron { justify-self: end; }
}
.login summary { cursor: pointer; font-weight: 650; }
.login form button + button { margin-top: .4rem; }
.project-list-panel { padding: 1.25rem; margin-bottom: 1rem; }
.project-list-panel h2 { font-size: 1.15rem; }
.project-list-panel p { margin-top: .6rem; }
.project-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.project-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  flex-wrap: wrap;
  padding: .75rem .5rem;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.project-list a:hover { background: var(--wash); }
.role-menu { display: grid; gap: .6rem; margin-top: 1rem; }
.login .quiet { display: block; margin-bottom: .6rem; padding-left: 0; }
.login details { margin-top: 1rem; }
.project-heading .round-actions { margin-top: 0; }
.project-heading .round-actions button { flex: 0 1 auto; }

.estimator-search-results {
  max-height: 10rem;
  overflow-y: auto;
  margin: .25rem 0 .75rem;
  padding: .25rem;
  list-style: none;
  border: 1px solid var(--border, #d4d4d4);
  border-radius: .5rem;
}
.estimator-search-results button {
  width: 100%;
  text-align: left;
}
