:root {
  --paper: #faf9f5;
  --surface: #ffffff;
  --ink: #1c3027;
  --muted: #5b6b61;
  --forest: #235b43;
  --forest-dark: #17442f;
  --sage: #eef3ed;
  --line: #d4ded2;
  --field-line: #94a99b;
  --amber: #775013;
  --amber-wash: #f9f1df;
  --error: #923831;
  --error-wash: #fcf0ed;
  --focus: #9a651d;
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--forest); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--forest-dark); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Cambria, Georgia, serif; font-weight: 400; }
h1 { font-size: clamp(2.3rem, 4.2vw, 3.4rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 1.1rem; overflow-wrap: anywhere; }
h2 { font-size: 1.8rem; line-height: 1.25; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; line-height: 1.4; font-weight: 600; margin-bottom: .7rem; }
p { margin-bottom: 1rem; }
img { max-width: 100%; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
.skip-link { position: absolute; z-index: 5; top: -6rem; left: 1rem; padding: .7rem 1rem; color: var(--surface); background: var(--forest); }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { width: min(100% - 4rem, 1240px); margin: 0 auto; min-height: 104px; display: flex; gap: 2rem; align-items: center; }
.brand { display: inline-flex; gap: .8rem; align-items: center; flex-shrink: 0; font-size: 1.7rem; font-weight: 600; line-height: 1.2; text-decoration: none; color: var(--forest); }
.brand img { flex-shrink: 0; }
.brand-caption { display: block; font-size: .78rem; font-weight: 400; color: var(--muted); margin-top: .2rem; }
.main-nav { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
.main-nav a { font-size: .91rem; text-decoration: none; padding: .5rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--forest); }
.main-nav a[aria-current="page"] { font-weight: 600; }
.account { display: flex; flex-direction: column; align-items: flex-end; max-width: 170px; line-height: 1.4; flex-shrink: 0; }
.account-name { font-size: .85rem; overflow-wrap: anywhere; text-align: right; }
.account form { margin: .2rem 0 0; }
.text-button { display: inline; border: 0; padding: .2rem 0; color: var(--forest); background: transparent; font-size: .9rem; text-decoration: underline; text-underline-offset: .22em; }
.text-button:hover { color: var(--forest-dark); }
.page { width: min(100% - 4rem, 1160px); margin: 0 auto; padding: 3rem 0 4.5rem; flex: 1; }
.page-heading { margin-bottom: 2.6rem; }
.page-heading p:last-child { margin-bottom: 0; }
.task-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 2.5rem; }
.task-heading > div:first-child { max-width: 760px; }
.task-heading > .button { flex-shrink: 0; margin-top: .5rem; }
.intro { font-size: 1.08rem; line-height: 1.65; max-width: 70ch; color: var(--muted); }
.context-label { color: var(--forest); font-size: .94rem; margin-bottom: .75rem; }
.context-detail { padding-left: .85rem; margin-left: .75rem; border-left: 1px solid var(--line); color: var(--muted); }
.muted { color: var(--muted); font-size: .9rem; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 284px; gap: 3.8rem; align-items: start; }
.assignment-overview, .assignment-body { border-top: 3px solid var(--forest); padding-top: 1.6rem; }
.assignment-overview > h2:not(:first-child) { margin-top: 2rem; }
.prose { max-width: 72ch; font-size: 1.05rem; line-height: 1.75; margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.assignment-section { margin-bottom: 2.5rem; }
.assignment-section:last-child { margin-bottom: 0; }
.assignment-section > p { max-width: 72ch; }
.prompt-text { border-left: 3px solid var(--line); padding: .8rem 0 .8rem 1.35rem; max-width: 72ch; line-height: 1.75; overflow-wrap: anywhere; }
.deadline-panel { background: var(--sage); padding: 1.6rem; border-radius: 3px; }
.deadline-panel h2 { font-size: 1.35rem; margin-bottom: .8rem; }
.deadline-panel h3 { margin-bottom: .6rem; }
.deadline-panel p { font-size: .92rem; line-height: 1.65; }
.deadline-panel p:last-child { margin-bottom: 0; }
.deadline-date { display: block; font-family: Cambria, Georgia, serif; font-size: 1.8rem; line-height: 1.25; color: var(--forest-dark); margin: 1rem 0; }
.deadline-date span { display: block; font-family: "Segoe UI", Arial, sans-serif; font-size: .93rem; color: var(--ink); margin-top: .5rem; }
.aside-note { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1.25rem; }
.aside-note .button { margin-top: .8rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border: 1px solid var(--forest); border-radius: 3px; padding: .65rem 1.05rem; font-size: .94rem; font-weight: 600; line-height: 1.4; text-decoration: none; text-align: center; }
.button-primary { color: var(--surface); background: var(--forest); }
.button-primary:hover { color: var(--surface); background: var(--forest-dark); border-color: var(--forest-dark); }
.button-secondary { color: var(--forest); background: transparent; }
.button-secondary:hover { color: var(--forest-dark); background: var(--sage); }
.button-block { width: 100%; }
.actions, .form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; align-items: center; }
.compact-actions { margin-top: 1.2rem; }
.receipt { margin-top: 1.6rem; border-left: 3px solid var(--forest); padding-left: 1rem; font-size: .93rem; }
.receipt .status { margin: 0 0 0 .6rem; }
.receipt p { margin: .45rem 0 0; color: var(--muted); }
.status { display: inline-block; padding: .25rem .6rem; color: var(--muted); background: var(--sage); border-radius: 3px; font-size: .8rem; line-height: 1.45; font-weight: 500; }
.status-credited { color: var(--forest-dark); background: #e8f0e5; }
.status-rework { color: var(--amber); background: var(--amber-wash); }
.page-section { border-top: 1px solid var(--line); margin-top: 3.5rem; padding-top: 2.1rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.25rem; }
.section-heading h2 { margin-bottom: .35rem; }
.section-heading p { margin-bottom: 0; }
.item-list { border-top: 1px solid var(--line); }
.assignment-row { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.assignment-row h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.assignment-row p { color: var(--muted); font-size: .88rem; margin-bottom: 0; }
.assignment-row:hover h3 { text-decoration: underline; text-underline-offset: .2em; }
.row-action { font-size: .85rem; flex-shrink: 0; }
.empty-text { color: var(--muted); padding: .5rem 0; }
.empty-state { max-width: 760px; border-left: 3px solid var(--line); padding: .5rem 0 .5rem 1.5rem; }
.empty-state h2 { font-size: 1.5rem; }
.empty-state p { color: var(--muted); }
.empty-state p:last-child { margin-bottom: 0; }
.back-link { display: inline-block; font-size: .92rem; margin-bottom: 1.65rem; }
.solution-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.solution-card { padding: 1.2rem 0; border-top: 2px solid var(--line); overflow-wrap: anywhere; }
.solution-card h3 { font-size: 1.25rem; margin-bottom: .8rem; }
.solution-card h3 a { text-decoration: none; }
.solution-card h3 a:hover { text-decoration: underline; }
.solution-card .muted { margin: .65rem 0 0; }
.solution-link { display: block; font-size: .9rem; margin-top: 1.3rem; }
.gallery-locked { border-left: 3px solid var(--line); padding: .5rem 0 .5rem 1.5rem; max-width: 750px; }
.gallery-locked p { font-size: .95rem; color: var(--muted); margin-bottom: 0; }
.text-content { max-width: 76ch; line-height: 1.8; overflow-wrap: anywhere; }
.solution-body { border-top: 3px solid var(--forest); padding-top: 1.6rem; }
.solution-sidebar { border-top: 1px solid var(--line); }
.sidebar-section { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.sidebar-section h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { margin-bottom: .95rem; }
.file-list li:last-child { margin-bottom: 0; }
.file-list a { display: block; overflow-wrap: anywhere; font-size: .95rem; }
.file-list span { font-size: .8rem; color: var(--muted); }
.vote-total { font-family: Cambria, Georgia, serif; font-size: 2.1rem; line-height: 1.2; margin-bottom: 1.1rem; color: var(--forest-dark); }
.vote-panel .form-note { margin-top: 1rem; }
.feedback-panel { border-left: 3px solid var(--forest); padding: .5rem 0 .5rem 1.4rem; margin-bottom: 2.5rem; }
.feedback-panel h2 { font-size: 1.45rem; }
.feedback-panel .prose { font-size: .98rem; margin-bottom: 0; }
.notice { border: 1px solid var(--line); padding: 1rem 1.3rem; background: var(--sage); margin-bottom: 2rem; font-size: .95rem; }
.notice p { margin: .3rem 0 0; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 284px; gap: 3.8rem; margin-top: 1.5rem; }
.moderation-panel { padding-top: .3rem; }
.moderation-panel p { color: var(--muted); font-size: .94rem; }
.auth-page { display: flex; align-items: flex-start; justify-content: center; padding-top: 4.5rem; }
.auth-panel { width: min(100%, 470px); }
.auth-panel h1 { font-size: 2.65rem; }
.auth-panel .intro { font-size: 1rem; }
.auth-panel .stack-form { margin-top: 2rem; }
.auth-panel .button-primary { width: 100%; margin-top: .5rem; }
.narrow-heading, .form-panel { max-width: 780px; }
.stack-form > p { margin-bottom: 1.4rem; }
.stack-form label, .invite-panel label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .5rem; }
.stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .stack-form textarea, .stack-form select, .invite-link { width: 100%; max-width: 100%; border: 1px solid var(--field-line); border-radius: 3px; color: var(--ink); background: var(--surface); padding: .7rem .8rem; min-height: 46px; }
.stack-form textarea { min-height: 145px; resize: vertical; line-height: 1.65; }
.stack-form select { appearance: auto; }
.stack-form input[type="checkbox"], .stack-form input[type="radio"] { width: 1.1rem; height: 1.1rem; vertical-align: middle; accent-color: var(--forest); }
.stack-form input[type="file"] { font-size: .9rem; padding: .6rem; }
.stack-form input[type="file"]::file-selector-button { padding: .45rem .7rem; margin-right: .8rem; border: 1px solid var(--line); color: var(--forest); background: var(--sage); border-radius: 2px; cursor: pointer; }
.stack-form input[aria-invalid="true"], .stack-form textarea[aria-invalid="true"], .stack-form select[aria-invalid="true"] { border-color: var(--error); }
.helptext { display: block; font-size: .85rem; line-height: 1.6; margin-top: .45rem; color: var(--muted); }
.helptext ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.errorlist { color: var(--error); background: var(--error-wash); border-left: 3px solid var(--error); list-style: none; padding: .75rem 1rem; font-size: .93rem; margin: .9rem 0; }
.errorlist li + li { margin-top: .4rem; }
.form-note { font-size: .86rem; line-height: 1.65; color: var(--muted); margin-top: 1.5rem; margin-bottom: 0; }
.messages { margin-bottom: 2rem; }
.message { border-left: 3px solid var(--forest); padding: .9rem 1.1rem; background: var(--sage); margin-bottom: .7rem; font-size: .95rem; overflow-wrap: anywhere; }
.message.error { background: var(--error-wash); border-color: var(--error); color: var(--error); }
.message.warning { background: var(--amber-wash); border-color: var(--amber); color: var(--amber); }
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; line-height: 1.5; }
.data-table th, .data-table td { padding: 1.05rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { color: var(--muted); font-size: .86rem; font-weight: 500; background: var(--sage); }
.data-table tbody th { font-weight: 600; }
.leaderboard-table { min-width: 510px; }
.leaderboard-table th:first-child, .leaderboard-table td:first-child { width: 90px; }
.leaderboard-table th:nth-child(3), .leaderboard-table td:nth-child(3), .leaderboard-table th:nth-child(4), .leaderboard-table td:nth-child(4) { text-align: right; }
.rank-cell { color: var(--muted); }
.credit-cell { color: var(--forest); font-weight: 600; }
.table-note { font-size: .88rem; color: var(--muted); line-height: 1.7; max-width: 75ch; margin-top: 1.5rem; }
.organizer-links { display: flex; gap: 2.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.organizer-links a { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; }
.organizer-links a:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.organizer-links strong { font-size: 1.1rem; font-weight: 500; }
.organizer-links span { font-size: .87rem; color: var(--muted); }
.organizer-task-list { border-top: 1px solid var(--line); }
.organizer-task { padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.organizer-task-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.organizer-task-heading h3 { font-family: Cambria, Georgia, serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; }
.organizer-task-heading h3 a { text-decoration: none; }
.organizer-task-heading h3 a:hover { text-decoration: underline; }
.organizer-task-heading .status { flex-shrink: 0; }
.schedule-details { display: flex; gap: 3rem; margin: 0; }
.schedule-details dt { color: var(--muted); font-size: .85rem; margin-bottom: .15rem; }
.schedule-details dd { font-size: .94rem; margin: 0; }
.invite-panel { padding: 1.4rem 1.6rem; background: var(--sage); margin-bottom: 2rem; border-left: 3px solid var(--forest); }
.invite-panel h2 { font-size: 1.6rem; }
.invite-panel p { max-width: 75ch; font-size: .94rem; }
.invite-link { font-size: .88rem; }
.members-table { min-width: 700px; }
.members-table th { min-width: 170px; }
.secondary-line { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .35rem; overflow-wrap: anywhere; }
.member-actions { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.danger-text { color: var(--error); }
.danger-text:hover { color: #762e28; }
.version-list { border-top: 1px solid var(--line); }
.version-entry { border-bottom: 1px solid var(--line); }
.version-entry > summary { cursor: pointer; padding: 1.3rem .4rem; line-height: 1.5; }
.version-entry > summary > span { font-weight: 600; margin-left: .3rem; }
.version-entry > summary time { color: var(--muted); font-size: .9rem; margin-left: 1.5rem; }
.version-entry[open] > summary { background: var(--sage); }
.version-content { padding: 1.8rem .4rem 2rem; }
.version-meta { margin: 0 0 2rem; }
.version-meta dt { color: var(--muted); font-size: .88rem; }
.version-meta dd { margin: .4rem 0 0; }
.version-content .assignment-section h2 { font-size: 1.4rem; }
.case-list { border-top: 1px solid var(--line); }
.case-entry { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.case-entry header h2 { margin-bottom: .65rem; overflow-wrap: anywhere; }
.case-details { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; row-gap: 1.5rem; margin: 1.8rem 0 0; }
.case-details dt { font-weight: 600; margin-bottom: .5rem; font-size: .95rem; }
.case-details dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.footer-inner { width: min(100% - 4rem, 1160px); margin: 0 auto; padding: 1.5rem 0; display: flex; justify-content: space-between; gap: 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) {
  .header-inner { gap: 1.5rem; }
  .main-nav { gap: 1rem; }
  .main-nav a { font-size: .86rem; }
  .account { max-width: 120px; }
  .content-layout, .review-layout { gap: 2.5rem; }
}
@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; padding: 1.1rem 0 .65rem; row-gap: .9rem; }
  .account { margin-left: auto; max-width: 190px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; column-gap: 1.6rem; row-gap: .2rem; }
  .main-nav a { font-size: .9rem; }
  .task-heading { display: block; }
  .task-heading > .button { margin-top: 1.4rem; }
  .task-heading > .status { margin-top: .75rem; }
  .solution-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .header-inner, .page, .footer-inner { width: calc(100% - 2.5rem); }
  .page { padding-top: 2rem; padding-bottom: 3rem; }
  .content-layout, .review-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .deadline-panel { max-width: none; }
  .page-heading { margin-bottom: 2rem; }
  .page-section { margin-top: 2.6rem; padding-top: 1.7rem; }
  .intro { font-size: 1rem; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: .75rem; }
  .section-heading > .button { margin-top: .35rem; }
  .assignment-row { gap: 1rem; }
  .row-action { display: none; }
  .organizer-task-heading { flex-direction: column; gap: .1rem; }
  .organizer-task-heading .status { margin-bottom: 1rem; }
  .schedule-details { gap: 1.5rem; flex-wrap: wrap; }
  .case-details { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; }
  .auth-page { padding-top: 2.5rem; }
  .auth-panel h1 { font-size: 2.3rem; }
  .footer-inner { flex-direction: column; gap: .35rem; }
  .table-scroll { margin-right: -1.25rem; padding-right: 1.25rem; }
}
@media (max-width: 480px) {
  .brand { font-size: 1.5rem; gap: .6rem; }
  .brand img { width: 36px; height: 36px; }
  .brand-caption { font-size: .72rem; }
  .account { max-width: 125px; }
  .account-name { font-size: .8rem; }
  .main-nav { column-gap: 1.2rem; }
  .main-nav a { font-size: .85rem; }
  .solution-grid { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .organizer-links { flex-direction: column; gap: 1.3rem; }
  .form-actions { align-items: stretch; }
  .form-actions .button { width: 100%; }
  .version-entry > summary time { display: block; margin: .45rem 0 0 1.6rem; }
  .receipt .status { display: table; margin: .6rem 0 0; }
  .invite-panel { padding: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .skip-link, .actions, .form-actions, .vote-panel form, .review-layout, .back-link { display: none; }
  :root { background: white; color: black; }
  .page { width: 100%; padding: 0; }
  .content-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .page-heading { margin-bottom: 1.5rem; }
  .deadline-panel { background: transparent; border: 1px solid #ccc; }
  a { color: black; }
}
