/* Offline desktop workspace: shared by every server-rendered page. */
:root {
  font-family:Pretendard,"Apple SD Gothic Neo","Malgun Gothic","Noto Sans KR",system-ui,sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.65;
  font-size:14px;
  color-scheme:light;
  --bg:#fdf3f8;
  --panel:#ffffff;
  --line:#f4dcec;
  --text:#493a53;
  --muted:#6d5a77;
  --accent:#ff7eb3;
  --accent-dk:#f2528f;
  --accent2:#8b7cf0;
  --ok:#35c98d;
  --warn:#ffab4a;
  --err:#ff6b6b;
  --side:#3c2b57;
  --side-text:#ddd0ee;
  --side-active:#ff7eb3;
  --border:var(--line);
  --shadow:0 6px 16px rgb(242 82 143 / 10%);
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
a {
  color:var(--accent-dk);
  text-underline-offset:3px;
  overflow-wrap:anywhere;
}
a,button,input,select,textarea {
  transition:background-color .15s,border-color .15s,box-shadow .15s;
}
a:hover {
  color:#d6397a;
}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:238px;
  padding:28px 16px 20px;
  background:var(--side);
  border-right:1px solid rgb(0 0 0 / 15%);
  display:flex;
  flex-direction:column;
  overflow-y:auto;
  z-index:5;
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 8px;
  color:var(--side-text);
  text-decoration:none;
  font-size:20px;
  font-weight:800;
  letter-spacing:-1px;
}
.brand-mark {
  display:grid;
  place-items:center;
  width:35px;
  height:35px;
  background:var(--accent);
  color:#fff;
  border-radius:12px;
  font-size:27px;
}
.sidebar-caption {
  margin:8px 0 24px 54px;
  font-size:11px;
  color:#a994c4;
}
.sidebar nav {
  display:flex;
  flex-direction:column;
  gap:5px;
}
.sidebar nav a {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:43px;
  padding:10px 12px;
  border:1px solid transparent;
  border-radius:12px;
  color:var(--side-text);
  text-decoration:none;
  font-size:12px;
  font-weight:600;
}
.sidebar nav a span {
  width:19px;
  text-align:center;
  font-size:16px;
}
.sidebar nav a:hover {
  background:rgb(255 255 255 / 8%);
  color:#fff;
}
.sidebar nav a[aria-current=page] {
  background:var(--side-active);
  border-color:var(--side-active);
  color:#fff;
  box-shadow:none;
}
.nav-label {
  font-size:10px;
  letter-spacing:1px;
  color:#8f7aad;
  margin:18px 12px 5px;
  font-weight:700;
}
.sidebar-note {
  margin-top:auto;
  padding:24px 12px 0;
  font-size:12px;
  color:var(--side-text);
}
.sidebar-note p {
  margin:8px 0 0;
  color:#a994c4;
  font-size:11px;
}
.status-dot {
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--ok);
  margin-right:5px;
}
main {
  margin-left:238px;
  padding:0 36px 30px;
  max-width:1840px;
  min-width:0;
}
.workspace-bar {
  min-height:68px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--border);
  margin-bottom:28px;
  color:var(--muted);
  font-size:12px;
}
.workspace-bar>span>span {
  margin:0 12px;
  color:#c9b8d6;
}
.workspace-chip {
  border:1px solid #c8ecd9;
  background:#e3f9ee;
  border-radius:999px;
  padding:5px 12px;
  color:#158048;
  font-size:11px;
}
h1 {
  font-size:29px;
  line-height:1.3;
  letter-spacing:-1.2px;
  margin:24px 0 12px;
  font-weight:800;
}
h2 {
  font-size:17px;
  letter-spacing:-.4px;
  margin:0 0 12px;
  font-weight:750;
}
h3 {
  font-size:15px;
  margin:16px 0 10px;
}
h4 {
  font-size:14px;
}
p {
  margin:10px 0;
  color:var(--muted);
}
small,.hash {
  font-size:11px;
  color:var(--muted);
}
.eyebrow {
  font-size:10px;
  letter-spacing:2px;
  color:var(--accent2);
  font-weight:800;
  margin:0 0 7px;
}
.dashboard-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:30px 0 24px;
}
.dashboard-heading h1 {
  margin:0 0 8px;
}
.dashboard-heading p:last-child {
  margin:0;
  font-size:13px;
}
.dashboard-heading>.button {
  padding:11px 22px;
}
section,article,form {
  min-width:0;
  border:1px solid var(--border);
  border-radius:18px;
  padding:24px;
  background:var(--panel);
  margin:20px 0;
  box-shadow:var(--shadow);
}
section form,article form,details form {
  border:0;
  padding:0;
  margin:16px 0 0;
  box-shadow:none;
}
article article,section article {
  background:#fff7fb;
  box-shadow:none;
}
section>p,article>p,form>p {
  font-size:12px;
  line-height:1.8;
}
section:target {
  outline:2px solid var(--accent2);
  outline-offset:4px;
}
section {
  scroll-margin-top:24px;
}
.cards {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin:20px 0;
}
.cards>div {
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  padding:20px;
  box-shadow:var(--shadow);
  min-width:0;
}
.cards>div:nth-child(1) {
  border-top:3px solid var(--accent2);
}
.cards>div:nth-child(2) {
  border-top:3px solid var(--warn);
}
.cards>div:nth-child(3) {
  border-top:3px solid var(--ok);
}
.cards>div:nth-child(4) {
  border-top:3px solid var(--accent);
}
.metric-label {
  color:var(--muted);
  font-size:12px;
  font-weight:600;
}
.cards strong {
  display:block;
  font-size:36px;
  line-height:1.3;
  margin:12px 0 16px;
  color:var(--text);
  font-variant-numeric:tabular-nums;
  letter-spacing:-1px;
}
.cards small {
  font-size:12px;
  margin-left:6px;
  font-weight:500;
}
.cards a {
  font-size:11px;
  text-decoration:none;
  color:var(--muted);
}
.cards a b {
  color:var(--accent);
}
.desk-status {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px;
  padding:20px 24px;
  background:#f3edfb;
  border:1px solid #e6d9f5;
  border-radius:16px;
  margin-bottom:24px;
}
.desk-status>div {
  min-width:0;
}
.desk-status strong {
  display:block;
  font-size:13px;
}
.desk-status span {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin:4px 0;
}
.desk-status>div+div {
  padding-left:28px;
  border-left:1px solid #e6d9f5;
}
.desk-status progress {
  display:block;
  width:100%;
  height:7px;
  margin-top:12px;
  accent-color:var(--accent2);
  border:0;
  border-radius:8px;
  overflow:hidden;
  background:#e8def5;
}
.desk-status progress::-webkit-progress-bar {
  background:#e8def5;
}
.desk-status progress::-webkit-progress-value {
  background:var(--accent2);
  border-radius:8px;
}
.desk-status progress::-moz-progress-bar {
  background:var(--accent2);
  border-radius:8px;
}
.getting-started {
  padding:22px 24px;
}
.getting-started ol {
  list-style:none;
  counter-reset:step;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
  padding:0;
  margin:18px 0 0;
}
.getting-started li {
  counter-increment:step;
  font-size:11px;
  color:var(--muted);
  line-height:1.8;
  margin:0;
  padding-right:12px;
  border-right:1px solid var(--border);
}
.getting-started li:last-child {
  border:0;
}
.getting-started li::before {
  content:counter(step,decimal-leading-zero);
  display:block;
  color:var(--accent2);
  background:#efe7fb;
  border-radius:8px;
  width:29px;
  text-align:center;
  font-size:12px;
  font-weight:800;
  margin-bottom:10px;
}
.preparation-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
.preparation-grid>section {
  margin:0;
}
label {
  display:block;
  font-size:12px;
  font-weight:650;
  margin:14px 0;
  color:var(--text);
  overflow-wrap:anywhere;
}
input,textarea,select {
  display:block;
  width:100%;
  max-inline-size:100%;
  padding:10px 12px;
  margin-top:6px;
  font:inherit;
  font-weight:400;
  color:var(--text);
  background:#fffafd;
  border:1.5px solid var(--line);
  border-radius:14px;
  min-height:40px;
}
input:hover,textarea:hover,select:hover {
  border-color:var(--accent);
}
textarea {
  min-height:105px;
  resize:vertical;
}
input[type=checkbox],input[type=radio] {
  display:inline-block;
  width:16px;
  height:16px;
  min-height:0;
  margin:0 7px 0 0;
  vertical-align:middle;
  flex-shrink:0;
  accent-color:var(--accent);
}
label:has(>input[type=checkbox]),.check {
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:500;
}
fieldset {
  min-inline-size:0;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 16px;
  margin:14px 0;
}
legend {
  font-size:12px;
  font-weight:700;
  padding:0 6px;
}
button,.button {
  display:inline-block;
  min-height:40px;
  border:1px solid var(--accent);
  border-radius:999px;
  padding:10px 20px;
  background:var(--accent);
  color:white;
  font:inherit;
  font-size:12px;
  font-weight:650;
  cursor:pointer;
  text-decoration:none;
  margin:12px 6px 0 0;
  box-shadow:0 6px 16px rgb(255 126 179 / 40%);
}
button:hover,.button:hover {
  background:var(--accent-dk);
  border-color:var(--accent-dk);
  color:#fff;
}
.secondary {
  background:#fff;
  color:var(--accent-dk);
  border-color:var(--accent);
  box-shadow:none;
}
button:disabled {
  background:#f7eef3;
  color:#c2a8b8;
  border-color:#f0dce8;
  cursor:not-allowed;
  box-shadow:none;
}
.badge {
  display:inline-block;
  vertical-align:baseline;
  font-size:10px;
  font-weight:650;
  padding:3px 9px;
  border-radius:999px;
  background:#f6edf3;
  color:var(--muted);
  border:1px solid #f0dce8;
  white-space:normal;
}
.badge[data-state=running],.badge[data-state=collecting],.badge[data-state=processing],.badge[data-state=watch] {
  background:#ffecd4;
  color:#8a4b00;
  border-color:#ffdba8;
}
.badge[data-state=approved],.badge[data-state=completed],.badge[data-state=succeeded],.badge[data-state=ok] {
  background:#e3f9ee;
  color:#158048;
  border-color:#c8ecd9;
}
.badge[data-state=caution] {
  background:#ffecd4;
  color:#8a4b00;
  border-color:#ffdba8;
}
.badge[data-state=error],.badge[data-state=failed],.badge[data-state=rejected],.badge[data-state=blocked],.badge[data-state=stopped],.badge[data-state=high_risk] {
  background:#ffe1e1;
  color:#c0392b;
  border-color:#ffc9c9;
}
[role=alert] {
  background:#ffe1e1;
  color:#c0392b;
  padding:14px 18px;
  border-left:3px solid var(--err);
  border-radius:14px;
}
[role=status],.notice {
  background:#e3f9ee;
  border:1px solid #c8ecd9;
  color:#158048;
  border-radius:14px;
  padding:12px 16px;
  font-size:11px;
}
.steps {
  font-size:11px;
  color:var(--muted);
  background:#f3ecfb;
  padding:12px 16px;
  border-radius:14px;
}
table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:12px;
  background:var(--panel);
}
th,td {
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  overflow-wrap:anywhere;
}
th {
  background:var(--bg);
  color:var(--muted);
  font-size:11px;
  font-weight:650;
}
td {
  color:var(--text);
}
tbody tr:hover {
  background:#fff5fa;
}
caption {
  text-align:left;
  padding:12px;
  font-weight:700;
}
.table-scroll {
  overflow-x:auto;
  border:1px solid var(--border);
  border-radius:14px;
  margin:18px 0;
}
.table-scroll table {
  min-width:650px;
}
video {
  width:100%;
  max-height:420px;
  background:#282737;
  border-radius:14px;
}
.thumbnail {
  width:100%;
  max-width:240px;
  border-radius:14px;
}
pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  background:#fdf3f8;
  color:var(--muted);
  padding:18px;
  border:1px solid var(--border);
  border-radius:14px;
  font-size:12px;
}
.hash {
  overflow-wrap:anywhere;
}
details {
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px 18px;
  margin:14px 0;
  font-size:12px;
}
summary {
  cursor:pointer;
  font-weight:650;
  color:var(--muted);
}
summary:hover {
  color:var(--accent);
}
li {
  overflow-wrap:anywhere;
  margin:8px 0;
}
section>ul {
  list-style:none;
  padding:0;
}
section>ul>li {
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  font-size:12px;
}
footer {
  font-size:11px;
  color:var(--muted);
  border-top:1px solid var(--border);
  margin-top:28px;
  padding:24px 0;
}
footer h2 {
  font-size:12px;
}
footer p {
  margin:5px 0;
}
.skip-link {
  position:fixed;
  top:-100px;
  left:250px;
  z-index:20;
  background:var(--panel);
  padding:12px;
  border-radius:14px;
}
.skip-link:focus {
  top:10px;
}
:focus-visible {
  outline:3px solid var(--accent2);
  outline-offset:3px;
}
/* Hash navigation remains correct with HTMX and without JavaScript. */
body[data-page=dashboard]:has(#assignments:target) .sidebar a[href="/#assignments"],body[data-page=dashboard]:has(#analytics:target) .sidebar a[href="/#analytics"] {
  background:var(--side-active);
  color:#fff;
  box-shadow:none;
}
body[data-page=dashboard]:has(main section:target) .sidebar a[href="/"] {
  background:transparent;
  box-shadow:none;
  border-color:transparent;
  color:var(--side-text);
}
@media(min-width:1600px) {
  main {
    padding-inline:48px;
  }
  .sidebar {
    width:250px;
  }
  main {
    margin-left:250px;
  }
}
@media(max-width:1050px) {
  .sidebar {
    width:210px;
  }
  main {
    margin-left:210px;
    padding-inline:20px;
  }
  .cards {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .getting-started ol {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .preparation-grid {
    grid-template-columns:1fr;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition:none!important;
  }
}
@media print {
  .sidebar,.workspace-bar,.notice,.steps,.no-print,.skip-link,footer {
    display:none;
  }
  main {
    margin:0;
    max-width:none;
    padding:0;
  }
  body {
    background:white;
    color:black;
  }
  .cards>div,section,article,form {
    box-shadow:none;
  }
  article {
    break-inside:avoid;
  }
  .table-scroll {
    overflow:visible;
  }
  .preparation-grid {
    display:block;
  }
  a {
    color:black;
  }
}
/* Keep existing narrow-window forms usable without changing the desktop desk. */
@media (max-width: 600px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-label {
    grid-column: 1 / -1;
  }
  .sidebar-note, .sidebar-caption {
    display: none;
  }
  main {
    margin-left: 0;
    padding-inline: 16px;
  }
  .cards, .desk-status, .getting-started ol {
    grid-template-columns: minmax(0, 1fr);
  }
  .desk-status > div + div {
    padding-left: 0;
    border-left: 0;
  }
  .getting-started li {
    border-right: 0;
  }
  .dashboard-heading {
    flex-wrap: wrap;
    gap: 12px;
  }
  .skip-link {
    left: 16px;
  }
}
