@font-face {
  font-family: Manrope;
  src: url("/assets/manrope.ttf") format("truetype");
  font-display: swap;
  font-weight: 200 800;
}
:root {
  font-family:
    Manrope,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  --ink: #22231f;
  --rail: #171817;
  --dark-panel: #252521;
  --light-muted: #cec1ad;
  --paper: #f3efe6;
  --surface: #fff9ed;
  --soft: #e9e1d3;
  --accent: #ffc247;
  --accent-soft: #f7e5be;
  --line: #d7cbb8;
  --control-line: #988675;
  --muted: #5e554a;
  --link: #865315;
  --hover-ease: cubic-bezier(0.22, 0.75, 0.25, 1);
  font-variant-numeric: tabular-nums;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 9px 14px;
  font-weight: 700;
}
button,
a.as-button,
.rail nav a {
  transition:
    background-color 280ms var(--hover-ease),
    border-color 280ms var(--hover-ease),
    color 240ms var(--hover-ease);
}
button:where(:not(:disabled)):hover,
a.as-button:hover {
  background: var(--accent-soft);
  border-color: var(--link);
}
button:disabled {
  opacity: 0.63;
  cursor: wait;
}
button.primary,
a.as-button.primary {
  background: var(--rail);
  border: 1px solid var(--accent);
  color: var(--surface);
}
button.primary:where(:not(:disabled)):hover,
a.as-button.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--rail);
}
a,
button,
input,
select,
textarea,
summary {
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--link);
}
.rail :focus-visible {
  outline-color: var(--accent);
}
a.as-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  padding: 9px 14px;
  font-weight: 700;
}
a.as-button:hover {
  text-decoration: none;
}
.skip {
  position: fixed;
  left: -300px;
  top: 10px;
  z-index: 50;
  background: var(--surface);
  padding: 12px;
}
.skip:focus {
  left: 10px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(30px, 3.4vw, 45px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 1.15;
}
h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.32;
}
h3 {
  font-size: 16px;
  letter-spacing: -0.025em;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.55;
}
.glyph {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
}
.glyph svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--surface);
  text-decoration: none;
}
.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.brand b {
  display: block;
  letter-spacing: 0.09em;
  font-size: 17px;
  line-height: 1.1;
}
.brand small {
  display: block;
  color: var(--light-muted);
  letter-spacing: 0.095em;
  font-size: 10px;
  margin-top: 5px;
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.rail {
  background: var(--rail);
  color: var(--surface);
  border-inline-end: 1px solid #634a2b;
  padding: 30px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.rail .brand {
  padding: 0 7px;
}
.rail nav {
  display: grid;
  gap: 3px;
}
.rail nav a {
  color: var(--light-muted);
  padding: 10px 12px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.rail nav a:hover {
  background: var(--dark-panel);
  color: var(--surface);
}
.rail nav a[aria-current] {
  background: var(--dark-panel);
  color: var(--accent);
  box-shadow: inset 2px 0 var(--accent);
}
.rail .nav-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-muted);
  font-weight: 700;
  margin: 20px 12px 5px;
}
.rail .nav-label:first-child {
  margin-top: 0;
}
.user-block {
  margin-top: auto;
  border-top: 1px solid #504639;
  padding: 18px 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
}
.user-block small {
  color: var(--light-muted);
}
.user-block .icon-btn {
  margin-left: auto;
  color: var(--light-muted);
}
.user-block .icon-btn:hover {
  background: var(--dark-panel);
  color: var(--accent);
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--rail);
  font-weight: 800;
  flex: none;
}
.icon-btn {
  padding: 7px;
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
}
.icon-btn:where(:not(:disabled)):hover {
  background: var(--accent-soft);
}
.workspace {
  min-width: 0;
}
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(18px, 3.5vw, 54px);
  height: 66px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
}
.bar .trail {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
}
.bar .trail strong {
  color: var(--ink);
}
.bar .mode {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.bar .mode:before {
  content: "";
  background: #64826e;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.mobile-nav {
  display: none;
}
main.content {
  max-width: 1740px;
  margin: auto;
  padding: 36px clamp(18px, 3.5vw, 54px) 60px;
}
.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 28px;
}
.kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link);
  font-weight: 750;
  margin: 0 0 10px;
}
.actions,
.controls,
.links,
.tabs,
.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.actions {
  justify-content: flex-end;
}
.section {
  margin-top: 26px;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 13px;
}
.section-head a {
  font-size: 13px;
  font-weight: 700;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 20px;
  min-width: 0;
}
.panel .section:first-child,
.panel .section-head:first-child {
  margin-top: 0;
}
.cols {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 20px;
  align-items: start;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.metric {
  display: block;
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 20px 22px;
  min-height: 113px;
  transition: background 0.12s ease;
}
.metric:last-child {
  border-right: 0;
}
.metric:hover {
  text-decoration: none;
  background: var(--accent-soft);
}
.metric strong {
  display: block;
  font-size: 35px;
  letter-spacing: -0.06em;
  margin-top: 5px;
  line-height: 1.05;
  font-weight: 640;
}
.metric .metric-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.metric .glyph {
  width: 16px;
  height: 16px;
}
.attention {
  display: grid;
  gap: 1px;
}
.attention a,
.row {
  min-height: 53px;
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 12px 0;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.attention a:last-child,
.row:last-child {
  border-bottom: 0;
}
.attention a:hover,
.row[href]:hover {
  color: var(--link);
  text-decoration: underline;
}
.icon-tile {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border-radius: 7px;
  color: var(--muted);
  flex: none;
}
.icon-tile.sand {
  background: var(--accent-soft);
  color: var(--link);
}
.tail {
  margin-left: auto;
  flex: none;
}
.row-content {
  min-width: 0;
}
.row strong,
.row-content {
  overflow-wrap: anywhere;
}
.row .tail {
  max-width: 42%;
  text-align: right;
}
.row-title {
  display: block;
  font-size: 14px;
  font-weight: 720;
}
.arrow {
  color: var(--muted);
  font-size: 18px;
}
.count {
  background: var(--soft);
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  margin-left: auto;
}
.light-block {
  background: var(--paper);
  padding: 14px;
  border-radius: 7px;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--soft);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.badge.sand {
  background: var(--accent-soft);
  color: var(--link);
}
.empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 0;
}
.photo-grid,
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(215px, 100%), 1fr));
  gap: 14px;
}
.photo {
  border: 1px solid var(--line);
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  min-width: 0;
}
.photo img {
  width: 100%;
  aspect-ratio: 1.63;
  object-fit: cover;
  display: block;
  background: var(--soft);
}
.photo .caption {
  display: block;
  padding: 11px 13px 13px;
}
.photo .caption b {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.photo small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--muted);
}
.photo-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}
.card h3 {
  margin: 10px 0 7px;
  overflow-wrap: anywhere;
}
.card-link {
  display: block;
  color: inherit;
}
.card-link:hover {
  text-decoration: none;
  border-color: var(--link);
}
.controls {
  margin: 0 0 18px;
}
.controls label,
.controls .field {
  min-width: 100px;
  margin: 0;
}
.tabs {
  padding: 4px;
  background: var(--soft);
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
}
.tabs a,
.tabs button {
  display: inline-block;
  padding: 8px 13px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.tabs [aria-current] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px #221a1020;
}
.tabs a:hover {
  text-decoration: none;
}
.kanban {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding: 2px 0 14px;
  align-items: stretch;
}
.lane {
  min-width: 215px;
  flex: 0 0 min(250px, 82%);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.lane header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
}
.lane header h3 {
  font-size: 14px;
}
.lane .card {
  border-color: var(--line);
  margin-top: 9px;
  padding: 13px;
}
.lane .card h3 {
  margin: 0 0 9px;
}
.lane .empty {
  font-size: 12px;
}
.field,
input,
select,
textarea {
  max-width: 100%;
}
.field,
form label,
.controls label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  font-weight: 650;
  font-size: 13px;
}
.field,
form label {
  margin-bottom: 14px;
}
input,
textarea,
select {
  padding: 10px 12px;
  border: 1px solid var(--control-line);
  background: var(--surface);
  border-radius: 6px;
  min-height: 42px;
  min-width: 0;
}
textarea {
  resize: vertical;
  line-height: 1.6;
  width: 100%;
}
.form-grid,
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.facts {
  margin: 0;
  gap: 18px;
}
.facts dt {
  color: var(--muted);
  font-size: 12px;
}
.facts dd {
  margin: 4px 0 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.error {
  color: #933c29;
  margin: 8px 0;
  font-weight: 600;
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}
.links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.timeline {
  display: grid;
  gap: 0;
}
.tick {
  font-size: 12px;
}
.task-toggle {
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--control-line);
  display: grid;
  place-items: center;
  border-radius: 7px;
  flex: none;
}
.task-toggle.done {
  background: #edf2e8;
  color: #3e644c;
}
.done-text {
  text-decoration: line-through;
  color: var(--muted);
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin: 0 0 20px;
}
.reading {
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px;
}
.stat-list {
  display: grid;
  gap: 12px;
}
.stat-line {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr auto;
  gap: 12px;
  align-items: center;
}
.stat-line progress {
  width: 100%;
  height: 10px;
  accent-color: var(--link);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 9px;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(600px, calc(100vw - 32px));
  max-height: 90dvh;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 20px 90px #1119;
}
dialog::backdrop {
  background: #17181799;
}
.dialog-head {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px;
}
.dialog-body {
  padding: 20px 22px;
}
.diagram-photo {
  display: block;
  max-height: 45vh;
  width: 100%;
  object-fit: contain;
  background: var(--soft);
  border-radius: 6px;
  margin: 0 0 17px;
}
.notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rail);
  color: var(--surface);
  padding: 11px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 20px #17181733;
  z-index: 10;
  max-width: calc(100% - 32px);
}
.notice:empty {
  display: none;
}
.loading {
  padding: 40px;
  color: var(--muted);
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
}
.login-art {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4.5vw, 85px);
  background: var(--rail);
  color: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 70px;
  isolation: isolate;
  border-inline-end: 1px solid #634a2b;
}
.login-art:before {
  content: "";
  z-index: -2;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 70px, #f0d4a413 70px 71px),
    repeating-linear-gradient(0deg, transparent 0 70px, #f0d4a413 70px 71px),
    radial-gradient(ellipse at 54% 45%, #533c245e, transparent 68%);
}
.login-art .mark-study {
  align-self: center;
  width: min(55%, 290px);
  height: auto;
  filter: drop-shadow(0 20px 28px #0a090755);
}
.login-art p {
  color: var(--light-muted);
  font-size: 13px;
}
.login-art h2 {
  font-size: clamp(30px, 4.5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 570;
  max-width: 500px;
}
.login-panel {
  display: grid;
  align-items: center;
  padding: 36px clamp(22px, 6vw, 100px);
}
.login-panel form {
  width: 100%;
  max-width: 420px;
  margin: auto;
}
.login-panel h1 {
  font-size: 32px;
  margin-bottom: 24px;
}
.login-panel button.primary {
  width: 100%;
  margin-top: 8px;
  min-height: 43px;
}
.login-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.login-code-actions button {
  min-height: 44px;
}
.password-intro {
  margin: 0 0 18px;
  color: var(--muted);
}
.password-rules {
  margin: -4px 0 12px;
}
.profile-password {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.login-panel details {
  margin-top: 23px;
}
.login-panel summary {
  font-size: 14px;
  cursor: pointer;
  color: var(--link);
  font-weight: 700;
}
.login-panel details label {
  margin-top: 13px;
}
.login-panel details p {
  margin-top: 8px;
}
.login-panel .kicker {
  color: var(--link);
}
.profile-note {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
@media (min-width: 1450px) {
  .shell {
    grid-template-columns: 255px minmax(0, 1fr);
  }
  .rail {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 1040px) {
  .shell {
    grid-template-columns: 194px minmax(0, 1fr);
  }
  .rail {
    padding-left: 10px;
    padding-right: 10px;
  }
  .cols {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .rail {
    position: static;
    display: none;
    height: auto;
    padding: 14px 18px;
  }
  .shell.menu-open .rail {
    display: flex;
    gap: 12px;
  }
  .rail nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rail .nav-label {
    grid-column: 1/-1;
    margin: 8px 12px 0;
  }
  .rail nav a {
    font-size: 13px;
    padding: 8px;
  }
  .rail .brand {
    display: none;
  }
  .user-block {
    padding-top: 12px;
  }
  .mobile-nav {
    display: inline-flex;
  }
  .bar {
    height: 52px;
    gap: 8px;
  }
  .bar .trail {
    font-size: 12px;
  }
  .bar .mode {
    font-size: 11px;
  }
  .page-title {
    display: grid;
    gap: 13px;
    margin-bottom: 18px;
  }
  .actions {
    justify-content: flex-start;
  }
  main.content {
    padding-top: 24px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    padding: 15px;
    min-height: 90px;
  }
  .metric strong {
    font-size: 28px;
  }
  .panel {
    padding: 15px;
  }
  .photo-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
  }
  .cards,
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(155px, 100%), 1fr));
  }
  .form-grid,
  .facts {
    grid-template-columns: 1fr;
  }
  .login {
    display: block;
  }
  .login-art {
    padding: 18px 24px;
    gap: 0;
    display: block;
    border-inline-end: 0;
    border-block-end: 1px solid #634a2b;
  }
  .login-art .mark-study,
  .login-art h2,
  .login-art p {
    display: none;
  }
  .login-panel {
    padding: 36px 24px;
  }
  .form-actions button {
    flex: 1;
  }
  .actions button {
    min-height: 40px;
  }
  .stat-line {
    grid-template-columns: 1fr 1fr auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
[hidden] {
  display: none !important;
}
.login-art .mark-study {
  image-rendering: auto;
}
button:disabled {
  cursor: default;
}
.content:focus {
  outline: none;
}
.timeline .form-actions,
.timeline form.section {
  margin: 0;
}
.timeline form button {
  padding: 6px 9px;
  font-size: 12px;
}
.timeline .actions {
  gap: 5px;
}

.bar .assistant-open {margin-left:auto;font-size:13px;min-height:32px;padding:4px 12px}
.bar .mode {margin-left:0}
.assistant-form textarea {width:100%;resize:vertical}
.assistant-examples {display:flex;gap:8px;flex-wrap:wrap}
.assistant-examples button {font-size:12px;text-align:left}
.assistant-status:empty,.assistant-answer:empty,.assistant-guide-host:empty {display:none}
.assistant-answer {border-top:1px solid var(--line);padding-top:12px}
.assistant-answer>.actions {margin-bottom:10px}
.assistant-guide {display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--accent-soft);padding:12px clamp(16px,3vw,42px)}
.assistant-guide small {font-weight:700;color:#55452d}
.assistant-guide p {margin:3px 0}
@media(max-width:620px){.bar .mode{display:none}.assistant-guide{align-items:start;flex-direction:column}}

.assistant-answer p {white-space:pre-line;overflow-wrap:anywhere}
.assistant-answer details {margin-bottom:8px;padding:8px 10px;border:1px solid var(--line);border-radius:6px}
.assistant-answer summary {cursor:pointer;font-weight:600}
.assistant-answer img {max-width:100%;height:auto;margin-right:6px}

.intake-works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.35rem 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
}
.intake-works label, .photo .ed-choice { display: flex; align-items: baseline; gap: 0.4rem; }

.cms-fields { display: grid; gap: 0.5rem; }
.cms-group { border: 1px solid var(--line); border-radius: 8px; padding: .7rem 1rem; }
.cms-group summary { cursor: pointer; font-weight: 650; }
.cms-field { display: grid; gap: .4rem; margin-top: .7rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.cms-field > button { justify-self: start; }
.cms-field textarea { width: 100%; resize: vertical; }
.cms-field .cms-reset { background: transparent; padding: .25rem 0; text-decoration: underline; }
.cms-actionbar { align-items: center; }
.cms-actionbar [hidden] { display: none; }

.photo-intake-form, .cms-editor { display: grid; gap: 1rem; }
.photo-intake-form .photo-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); }
.photo-intake-form .photo .ed-choice, .photo-intake-form .photo > small { padding: 0 .6rem; }
.photo-intake-form input[type="checkbox"], .cms-editor input[type="checkbox"] { width: auto; min-height: auto; margin: 0; }
.photo-intake-form > button { justify-self: start; }
.cms-editor > .error:empty, .photo-intake-form > .error:empty { display: none; }
.cms-actionbar { justify-content: flex-start; }
.cms-field .cms-reset { border: 0; min-height: 2rem; }

.cms-extra[open] > summary { margin-bottom: .75rem; }
.cms-extra > .field { margin-top: .5rem; }
.cms-extra > .actions { margin-top: .75rem; }
.cms-editor > .section > .cms-fields > button { justify-self: start; }
