:root {
  color-scheme: light;
  --bg: #f6f7f5;
  --ink: #161815;
  --muted: #687066;
  --line: #dfe4dc;
  --panel: #ffffff;
  --accent: #2f6f5e;
  --accent-ink: #ffffff;
  --warn: #8a4b30;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; }
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
}
.login-copy {
  padding: clamp(32px, 7vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}
.login-copy h1 {
  max-width: 760px;
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: .94;
  letter-spacing: 0;
}
.login-copy p { max-width: 560px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #b9c9c0;
  background: #e8f0eb;
  color: #18483c;
  font-weight: 800;
  letter-spacing: 0;
}
.mark.small { width: 42px; height: 42px; font-size: 14px; }
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.login-panel {
  align-self: center;
  margin: 32px;
  padding: 30px;
}
h2 { margin: 0 0 22px; font-size: 24px; }
label { display: grid; gap: 8px; margin: 0 0 16px; }
label span { color: var(--muted); font-size: 13px; font-weight: 700; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 0 12px;
  background: #fbfcfb;
  color: var(--ink);
  font: inherit;
}
button, .primary {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
button:active, .primary:active { transform: translateY(1px); }
.alert, .notice {
  border-radius: 6px;
  padding: 12px 14px;
  margin: 0 0 18px;
}
.alert { background: #fff1ea; color: var(--warn); border: 1px solid #e7c1ae; }
.notice { background: #edf6f0; color: #225443; border: 1px solid #bfd7ca; }
.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.rail {
  border-right: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: #fbfcfb;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
nav { display: grid; gap: 8px; }
nav a, .logout {
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
}
nav a.active { color: var(--ink); background: #eef3ef; }
.logout { margin-top: auto; }
.workspace { padding: clamp(22px, 4vw, 54px); }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 26px;
}
.topbar h1 { margin: 6px 0 0; font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: 0; }
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  background: white;
  white-space: nowrap;
}
.grid {
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.create, .rules { padding: 22px; }
.hint { margin: 16px 0 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.rules ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.projects { margin-top: 34px; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head span { color: var(--muted); }
.empty {
  border: 1px dashed #bdc8be;
  border-radius: 8px;
  padding: 26px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
}
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.project h3 { margin: 4px 0 8px; font-size: 24px; }
.project a { color: var(--accent); font-weight: 800; }
.owner { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 800; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; justify-content: end; }
.meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: white;
  font-size: 13px;
}
.inline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px auto;
  gap: 10px;
  margin-top: 4px;
}
.inline button { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 820px) {
  .login, .shell, .grid, .project { grid-template-columns: 1fr; }
  .login-copy { border-right: 0; border-bottom: 1px solid var(--line); padding: 32px 22px; }
  .login-panel { margin: 22px; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .topbar { display: grid; }
  .meta { justify-content: start; }
  .inline { grid-template-columns: 1fr; }
}
