:root {
  color-scheme: dark;
  --ink: #0d0e0e;
  --ink-soft: #111313;
  --raised: #151717;
  --panel: #191b1b;
  --panel-2: #1f2221;
  --line: #2b2e2d;
  --line-strong: #454a47;
  --text: #f2eee7;
  --muted: #a4a8a2;
  --muted-2: #777c75;
  --accent: #c8a578;
  --accent-2: #ead7bd;
  --ambient: rgba(200, 165, 120, .17);
  --danger: #e0867c;
  --success: #9bcaa3;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, Avenir, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% -10%, var(--ambient), transparent 30rem),
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, .035), transparent 22rem),
    var(--ink);
}

body[data-theme="ember"] {
  --accent: #c8a578;
  --accent-2: #ead7bd;
  --ambient: rgba(200, 165, 120, .17);
}

body[data-theme="graphite"] {
  --ink: #0b0c0d;
  --ink-soft: #111214;
  --raised: #17191b;
  --panel: #1b1d20;
  --panel-2: #23262a;
  --line: #30343a;
  --line-strong: #505660;
  --text: #f3f2ee;
  --muted: #a9abb0;
  --accent: #d8d5ce;
  --accent-2: #ffffff;
  --ambient: rgba(216, 213, 206, .12);
}

body[data-theme="botanical"] {
  --ink: #0d120f;
  --ink-soft: #111813;
  --raised: #162018;
  --panel: #19231b;
  --panel-2: #203023;
  --line: #304034;
  --line-strong: #536857;
  --accent: #9bcaa3;
  --accent-2: #d6f1d9;
  --ambient: rgba(155, 202, 163, .17);
}

body[data-theme="ocean"] {
  --ink: #071014;
  --ink-soft: #0d171c;
  --raised: #111e24;
  --panel: #14242b;
  --panel-2: #1b333d;
  --line: #294550;
  --line-strong: #4d7480;
  --accent: #7fc7d9;
  --accent-2: #c8f1f8;
  --ambient: rgba(127, 199, 217, .18);
}

body[data-theme="violet"] {
  --ink: #0f0b18;
  --ink-soft: #151020;
  --raised: #1b1428;
  --panel: #211932;
  --panel-2: #2b2141;
  --line: #42345e;
  --line-strong: #6b5a91;
  --accent: #b9a7ff;
  --accent-2: #eadfff;
  --ambient: rgba(185, 167, 255, .18);
}

body[data-theme="custom"] {
  --accent-2: color-mix(in srgb, var(--accent) 45%, #ffffff);
  --ambient: color-mix(in srgb, var(--accent) 20%, transparent);
}

img,
svg,
video {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

h1,
h2 {
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  letter-spacing: -.025em;
}

h1 {
  margin: .2rem 0 .65rem;
  font-size: clamp(2.15rem, 5vw, 4rem);
  line-height: .98;
}

h2 {
  margin: 0 0 1.1rem;
  font-size: 1.35rem;
}

h3 {
  margin: 0;
  font-size: 1rem;
}

p {
  line-height: 1.65;
}

small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 76px;
  padding: 0 max(24px, 4vw);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 14, 14, .92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  margin-right: auto;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.brand small {
  color: var(--muted-2);
  font-size: .54rem;
  letter-spacing: .18em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font: 700 .86rem Georgia, serif;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 1.8vw, 2rem);
}

.topbar nav a,
.link-button {
  color: var(--muted);
  font: inherit;
  font-size: .85rem;
}

.nav-link-with-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.nav-badge {
  display: inline-grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #16120d;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1;
}

.topbar nav a:hover,
.link-button:hover {
  color: var(--text);
}

.topbar form {
  margin: 0;
}

.nav-toggle,
.link-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  color: var(--text);
  font-size: 1.35rem;
}

.onboarding-body .topbar nav,
.onboarding-body .nav-toggle {
  display: none;
}

.onboarding-body .topbar {
  justify-content: space-between;
}

.shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 100px;
}

.onboarding-body .shell {
  width: min(1500px, calc(100% - 48px));
}

.auth-shell {
  display: grid;
  width: min(100% - 32px, 1240px);
  min-height: 100vh;
  place-items: center;
  padding: 30px 0;
}

.public-page {
  min-width: 0;
  width: min(100%, 920px);
  max-width: 100%;
}

.public-hero {
  margin-bottom: 28px;
}

.public-hero .muted {
  max-width: 680px;
}

.public-footer {
  width: min(100%, 920px);
  margin: 22px auto 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
  text-align: center;
}

.public-footer p {
  margin: 0 0 8px;
}

.public-footer nav {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.public-legal-body .auth-shell {
  align-items: start;
  justify-items: center;
  padding-top: clamp(28px, 6vw, 72px);
}

.legal-page {
  display: grid;
  justify-self: center;
  width: min(100%, 920px);
  gap: 22px;
}

.legal-hero {
  display: grid;
  gap: 34px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: calc(var(--radius) + 10px);
  background:
    radial-gradient(circle at 100% 0, var(--ambient), transparent 20rem),
    linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  box-shadow: var(--shadow);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--text);
  font-weight: 850;
  letter-spacing: -.02em;
}

.legal-brand .brand-mark {
  margin: 0;
}

.legal-hero-copy {
  max-width: 760px;
}

.legal-hero-copy h1 {
  max-width: 720px;
}

.legal-hero-copy .muted {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 1.02rem;
}

.legal-card {
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(145deg, rgba(27, 29, 29, .96), rgba(17, 19, 19, .98));
  box-shadow: 0 18px 55px rgba(0, 0, 0, .24);
}

.legal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-copy {
  max-width: 74ch;
  color: var(--text);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.legal-copy p {
  margin: 0 0 1.15rem;
}

.legal-copy p:last-child {
  margin-bottom: 0;
}

.legal-actions {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.legal-settings-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
}

.legal-settings-note strong {
  display: block;
  margin-bottom: 4px;
}

.legal-settings-note p {
  margin: 0;
  color: var(--muted);
}

.legal-settings-note .actions {
  flex-wrap: nowrap;
}

.legal-editor-grid .field.wide:has(.legal-textarea) {
  grid-column: span 6;
}

.legal-textarea {
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.55;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 42px;
}

.page-head > * {
  min-width: 0;
}

.actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .78rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: .83rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #16120d;
}

.button.primary:hover {
  background: var(--accent-2);
  color: #16120d;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  overflow: hidden;
  margin-bottom: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 19, 19, .88);
}

.stats article {
  min-width: 0;
  padding: 25px 30px;
  border-right: 1px solid var(--line);
}

.stats article:last-child {
  border-right: 0;
}

.attention-panel {
  margin-bottom: 48px;
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.stats strong {
  display: block;
  margin: .55rem 0;
  overflow-wrap: anywhere;
  font: 600 2rem Georgia, serif;
}

.dashboard-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .8fr);
  gap: 32px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
}

.section-head a {
  color: var(--accent);
  font-size: .8rem;
  white-space: nowrap;
}

.help-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 32px;
  overflow: hidden;
  border: 1px solid rgba(214, 160, 108, .22);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(circle at top right, rgba(214, 160, 108, .22), transparent 34%),
    linear-gradient(145deg, #201b18, #141615 70%);
}

.help-hero::before {
  content: "?";
  position: absolute;
  right: 36px;
  bottom: -58px;
  color: rgba(255, 255, 255, .035);
  font-size: 11rem;
  font-weight: 900;
  line-height: 1;
}

.help-hero > * {
  position: relative;
  z-index: 1;
}

.help-hero h1 {
  margin-bottom: .35rem;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  letter-spacing: -.08em;
}

.help-search-card {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
}

.help-search-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.help-search-box {
  display: flex;
  gap: 10px;
}

.help-search-box input {
  flex: 1;
  min-width: 0;
}

.help-search-card p {
  margin: 10px 0 0;
  font-size: .85rem;
}

.help-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.help-quick-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1b1d1d, #151717);
  color: var(--text);
}

.help-quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 160, 108, .5);
}

.help-quick-card span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(214, 160, 108, .14);
  color: var(--accent);
  font-weight: 900;
}

.help-quick-card strong {
  font-size: 1rem;
}

.help-quick-card small {
  color: var(--muted);
  line-height: 1.45;
}

.help-start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 20px;
  margin-bottom: 28px;
}

.help-start-card h2,
.help-rules-card h2 {
  margin-top: 0;
}

.help-steps,
.help-rule-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.help-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.help-steps span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(214, 160, 108, .14);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 900;
}

.help-steps p,
.help-rule-list li {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.help-steps strong {
  color: var(--text);
}

.help-rule-list li {
  position: relative;
  padding-left: 22px;
}

.help-rule-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(230px, .42fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.help-content {
  display: grid;
  gap: 20px;
}

.help-index {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-index a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
  color: var(--muted);
}

.help-index a:hover {
  background: rgba(255, 255, 255, .04);
  color: var(--accent);
}

.help-section {
  scroll-margin-top: 110px;
}

.help-section[hidden],
.help-empty[hidden],
[data-help-item][hidden] {
  display: none;
}

.help-section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.help-section-head h2 {
  margin: 0;
}

.help-section-head > span {
  align-self: start;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  white-space: nowrap;
}

.help-section details {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}

.help-section details[open] {
  border-color: rgba(214, 160, 108, .22);
  background: rgba(214, 160, 108, .045);
}

.help-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  font-weight: 850;
  list-style: none;
}

.help-section summary::-webkit-details-marker {
  display: none;
}

.help-section summary::after {
  content: "+";
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(214, 160, 108, .12);
  color: var(--accent);
}

.help-section details[open] summary::after {
  content: "–";
}

.help-section details p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
}

.help-section details a,
.help-glossary a {
  color: var(--accent);
}

.help-glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 0;
}

.help-glossary div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}

.help-glossary dt {
  color: var(--text);
  font-weight: 850;
}

.help-glossary dd {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.list-card,
.panel,
.data-card,
.form-card,
.info-card,
.project-card,
.gallery-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1b1d1d, #151717);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .035);
}

.panel,
.form-card {
  padding: 24px;
}

.info-card {
  margin-bottom: 24px;
  padding: 24px;
}

.info-card h2 {
  margin: 0 0 1rem;
}

.info-list {
  display: grid;
  gap: .85rem;
}

.info-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.info-list strong {
  color: var(--text);
}

.empty {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.list-row,
.calendar-row,
.file-row,
.payment-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child,
.calendar-row:last-child,
.file-row:last-child,
.payment-row:last-child {
  border-bottom: 0;
}

.list-row:hover,
.calendar-row:hover,
.file-row:hover {
  background: rgba(255, 255, 255, .035);
}

.list-row span,
.calendar-row span,
.file-row span,
.payment-row span {
  min-width: 0;
}

.list-row > span:not(.badge):not(.tag),
.calendar-row > span:not(.badge):not(.tag),
.file-row > span:not(.badge):not(.tag),
.payment-row > span:not(.badge):not(.tag) {
  flex: 1 1 auto;
}

.list-row strong,
.calendar-row strong,
.file-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row time,
.calendar-row time {
  width: 52px;
  flex: 0 0 auto;
  color: var(--accent);
  font-size: .7rem;
  text-align: center;
  text-transform: uppercase;
}

.list-row time b,
.calendar-row time b {
  display: block;
  font: 600 1.45rem Georgia, serif;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .3rem .58rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: #cfd2cc;
  font-size: .68rem;
  line-height: 1.1;
  white-space: nowrap;
}

.tag {
  margin: 0 .25rem .25rem 0;
}

.status-completed {
  border-color: rgba(155, 202, 163, .38);
  color: var(--success);
}

.status-new,
.attention-row .badge {
  border-color: rgba(200, 165, 120, .52);
  color: var(--accent-2);
}

.status-cancelled,
.danger {
  color: var(--danger);
}

.pipeline {
  border-top: 1px solid var(--line);
}

.pipeline div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.pipeline b {
  color: var(--text);
}

.messages {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 50;
  display: grid;
  gap: .7rem;
  width: min(380px, calc(100vw - 32px));
}

.message {
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #262929;
  box-shadow: var(--shadow);
  transition: opacity .3s, transform .3s;
}

.message.success {
  border-color: rgba(155, 202, 163, .5);
}

.message.error {
  border-color: rgba(224, 134, 124, .6);
}

.message.fade {
  opacity: 0;
  transform: translateY(-8px);
}

.filterbar,
.searchbar {
  display: flex;
  align-items: stretch;
  gap: .75rem;
  margin-bottom: 28px;
}

.filterbar input,
.searchbar input {
  flex: 1 1 280px;
}

.filterbar select {
  flex: 0 1 220px;
}

.searchbar {
  max-width: 800px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.35;
  white-space: normal;
  max-width: 100%;
}

.form-card .check {
  min-height: 42px;
  padding: .35rem 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: .8rem .9rem;
  border: 1px solid #343837;
  border-radius: var(--radius-sm);
  outline: none;
  background: #101212;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 165, 120, .14);
}

input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  margin-top: .1rem;
  accent-color: var(--accent);
}

input[type="file"] {
  padding: .65rem;
}

input[type="color"] {
  width: 100%;
  max-width: 180px;
  height: 56px;
  min-height: 56px;
  padding: 6px;
  border-radius: 16px;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 11px;
}

input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 11px;
}

.form-card {
  padding: 32px;
}

.form-card.narrow {
  max-width: 760px;
}

.form-card > div:not(.form-grid):not(.form-actions),
.form-card .field {
  margin-bottom: 1.2rem;
}

.form-section {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

.tattoo-form-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .025);
}

.tattoo-photo-group {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tattoo-attachment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.add-more-button {
  width: 100%;
  margin-bottom: 28px;
}

.add-more-field .add-more-button {
  margin-bottom: 0;
}

.remove-section-button {
  color: var(--danger);
  font-size: .78rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.copy-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.form-grid .field {
  margin-bottom: 0;
}

.field.wide {
  grid-column: 1 / -1;
}

.onboarding-shell {
  display: grid;
  gap: 30px;
  align-items: start;
  max-width: 1480px;
  margin: 0 auto;
}

.onboarding-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: end;
  overflow: hidden;
  padding: clamp(26px, 3.4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 24rem),
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, .06), transparent 18rem),
    linear-gradient(145deg, #202322, #121414);
  box-shadow: var(--shadow);
}

.onboarding-hero h1 {
  max-width: 20ch;
  margin-bottom: 1rem;
  font-size: clamp(2.45rem, 5vw, 4.75rem);
}

.onboarding-hero .muted {
  max-width: 680px;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.65;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.onboarding-steps a {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(0, 0, 0, .16);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}

.onboarding-steps a:hover,
.onboarding-steps a:focus-visible {
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-2px);
}

.onboarding-steps b {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .72rem;
}

.onboarding-steps a.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
}

.form-section {
  scroll-margin-top: 96px;
}

.settings-form {
  max-width: none;
}

.settings-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 28px;
  align-items: start;
}

.settings-workbench > .form-card {
  padding: clamp(22px, 3vw, 38px);
  border-radius: 28px;
}

.settings-section-head {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.settings-section-head > span {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 900;
}

.settings-section-head h2,
.settings-section-head p {
  margin: 0;
}

.settings-section-head p {
  margin-top: 4px;
}

.settings-form .form-section {
  padding: 24px;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .022);
}

.settings-form .form-section + .form-section {
  margin-top: 18px;
}

.theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.theme-choice {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 142px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.theme-choice:hover,
.theme-choice:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .22);
  transform: translateY(-2px);
}

.theme-choice input {
  position: absolute;
  inset: 12px 12px auto auto;
  width: 18px;
  height: 18px;
  min-height: 0;
}

.theme-choice strong {
  padding-right: 24px;
}

.theme-choice small {
  color: var(--muted);
  line-height: 1.35;
}

.theme-choice-swatch {
  display: flex;
  gap: 6px;
}

.theme-choice-swatch i {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
}

.theme-choice-ember .theme-choice-swatch i:nth-child(1) { background: #0d0e0e; }
.theme-choice-ember .theme-choice-swatch i:nth-child(2) { background: #c8a578; }
.theme-choice-ember .theme-choice-swatch i:nth-child(3) { background: #ead7bd; }
.theme-choice-graphite .theme-choice-swatch i:nth-child(1) { background: #0b0c0d; }
.theme-choice-graphite .theme-choice-swatch i:nth-child(2) { background: #d8d5ce; }
.theme-choice-graphite .theme-choice-swatch i:nth-child(3) { background: #505660; }
.theme-choice-botanical .theme-choice-swatch i:nth-child(1) { background: #0d120f; }
.theme-choice-botanical .theme-choice-swatch i:nth-child(2) { background: #9bcaa3; }
.theme-choice-botanical .theme-choice-swatch i:nth-child(3) { background: #203023; }
.theme-choice-ocean .theme-choice-swatch i:nth-child(1) { background: #071014; }
.theme-choice-ocean .theme-choice-swatch i:nth-child(2) { background: #7fc7d9; }
.theme-choice-ocean .theme-choice-swatch i:nth-child(3) { background: #1b333d; }
.theme-choice-violet .theme-choice-swatch i:nth-child(1) { background: #0f0b18; }
.theme-choice-violet .theme-choice-swatch i:nth-child(2) { background: #b9a7ff; }
.theme-choice-violet .theme-choice-swatch i:nth-child(3) { background: #2b2141; }
.theme-choice-custom .theme-choice-swatch i:nth-child(1) { background: #111313; }
.theme-choice-custom .theme-choice-swatch i:nth-child(2) { background: linear-gradient(135deg, #c7ff5a, #7fc7d9, #b9a7ff); }
.theme-choice-custom .theme-choice-swatch i:nth-child(3) { background: #1f2221; }

.settings-preview {
  position: sticky;
  top: 28px;
}

.settings-preview-head {
  padding: 0 4px 14px;
}

.settings-preview-head h2,
.settings-preview-head p {
  margin: 0;
}

.settings-preview-head p {
  margin-top: 6px;
}

.preview-phone {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 0%, var(--ambient), transparent 15rem),
    linear-gradient(145deg, #1b1d1d, #101212);
  box-shadow: var(--shadow);
}

.preview-phone-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.preview-phone-bar span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #16120d;
  font-size: .72rem;
  font-weight: 900;
}

.preview-phone-bar strong {
  overflow: hidden;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-panel {
  margin: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .035);
}

.preview-panel h3 {
  margin: 0 0 8px;
}

.preview-panel p,
.preview-info-list span {
  color: var(--muted);
  line-height: 1.45;
}

.preview-fields {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.preview-fields span {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: .78rem;
}

.preview-success {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.preview-info-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.preview-info-list li {
  display: grid;
  gap: 3px;
}

.field label,
.form-card > div > label,
.login-card label {
  display: block;
  margin-bottom: .45rem;
  color: #c5c7c3;
  font-size: .77rem;
  font-weight: 600;
}

.helptext,
.field small {
  margin-top: .35rem;
}

.errorlist,
.error {
  margin: .45rem 0 0;
  padding: 0;
  color: var(--danger);
  font-size: .78rem;
  list-style: none;
}

.form-actions {
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: left;
  text-transform: uppercase;
}

td {
  font-size: .88rem;
}

tr:last-child td {
  border-bottom: 0;
}

tr.clickable-row {
  cursor: pointer;
}

tr.clickable-row:hover td {
  background: rgba(255, 255, 255, .025);
}

tr.clickable-row.is-new td {
  background: rgba(200, 165, 120, .055);
}

tr.clickable-row.is-new:hover td {
  background: rgba(200, 165, 120, .085);
}

tr.clickable-row:focus-visible td {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: flex;
  min-width: 0;
  min-height: 210px;
  flex-direction: column;
  padding: 22px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.project-card:hover {
  border-color: #4a4d4b;
  box-shadow: var(--shadow);
  color: var(--text);
  transform: translateY(-3px);
}

.project-card > div:first-child,
.card-foot,
.title-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.title-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.project-card h2 {
  margin: 28px 0 5px;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
}

.card-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.details div {
  min-width: 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.details dt {
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.details dd {
  margin: .35rem 0 0;
  overflow-wrap: anywhere;
}

.quote-item-list {
  display: grid;
  gap: 14px;
}

.quote-item-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .03);
}

.quote-item-card p {
  margin-bottom: 0;
}

.quote-item-card.compact {
  padding: 14px;
}

.quote-item-card h4 {
  margin: 0 0 12px;
}

.public-price-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  text-align: left;
}

.public-price-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
}

.public-price-list span {
  color: var(--muted);
}

.signature-pad-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf4;
  overflow: hidden;
}

.signature-pad {
  display: block;
  width: 100%;
  min-height: 180px;
  touch-action: none;
  cursor: crosshair;
}

.signature-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.signature-actions .link-button {
  min-height: 42px;
  padding: .55rem 0;
}

.field-error {
  margin: 6px 0 0;
  color: #ffd0c2;
  font-size: .85rem;
}

.signature-preview {
  max-width: 320px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf4;
}

.sensitive {
  border-left: 3px solid #8d6951;
}

.timeline {
  margin-top: 22px;
}

.timeline > div {
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
}

.timeline i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline p {
  min-width: 0;
  margin: 0;
  font-size: .82rem;
}

.file-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .055);
  color: var(--accent);
}

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.file-preview-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .035);
}

.file-preview-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview-card p {
  margin: .55rem 0 0;
  color: var(--accent);
  font-size: .82rem;
}

.file-preview-image {
  display: grid;
  overflow: hidden;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 10px;
  background: #0b0c0c;
}

.file-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-document {
  border: 1px solid var(--line);
  color: var(--accent);
  font: 700 .9rem Georgia, serif;
  letter-spacing: .08em;
}

.payment-row {
  justify-content: space-between;
}

.payment-row form {
  flex: 0 0 auto;
}

.calendar-list {
  display: flex;
  max-width: 900px;
  flex-direction: column;
  gap: 42px;
}

.login-card {
  width: min(430px, 100%);
  padding: 44px;
  box-shadow: var(--shadow);
}

.hero-mark {
  width: 58px;
  height: 58px;
  margin-bottom: 32px;
  font-size: 1.8rem;
}

.login-card h1 {
  font-size: 3rem;
}

.login-card form {
  margin-top: 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gallery-card {
  overflow: hidden;
}

.gallery-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0b0c0c;
}

.gallery-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.gallery-card:hover img {
  transform: scale(1.025);
}

.gallery-copy {
  padding: 20px;
}

.gallery-copy h2 {
  margin: .2rem 0 .4rem;
}

.gallery-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .82rem;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  margin: 1rem 0;
}

.gallery-thumbs a {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0c0c;
}

.gallery-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1000px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0 1rem;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    border: 1px solid transparent;
    border-radius: 999px;
    line-height: 1;
  }

  .nav-toggle:focus-visible,
  .nav-toggle:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, .04);
  }

  .topbar nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .4rem;
    padding-top: 12px;
  }

  .topbar nav.open {
    display: flex;
  }

  .topbar nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
  }

  .topbar form {
    display: none;
  }

  .topbar nav.open + form {
    display: block;
    order: 11;
    width: 100%;
    padding-top: .6rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
  }

  .topbar nav.open + form .link-button {
    min-height: 38px;
    color: var(--accent);
  }

.dashboard-grid,
.detail-grid {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: clamp(2rem, 10vw, 2.85rem);
    line-height: 1.03;
  }

  h2 {
    font-size: 1.25rem;
  }

  .shell {
    width: min(100% - 28px, 1240px);
    padding-top: 30px;
    padding-bottom: 70px;
  }

  .topbar {
    min-height: 70px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand {
    gap: 9px;
    font-size: .72rem;
    letter-spacing: .11em;
  }

  .brand small {
    font-size: .5rem;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 24px;
  }

  .page-head p {
    margin-bottom: 0;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .actions .button {
    flex: 1 1 calc(50% - .5rem);
  }

  .page-head > .button {
    flex: none;
    width: 100%;
    min-height: 48px;
  }

  .public-page {
    width: 100%;
  }

  .onboarding-shell {
    grid-template-columns: 1fr;
  }

  .settings-workbench {
    grid-template-columns: 1fr;
  }

  .settings-preview {
    position: static;
  }

  .onboarding-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .onboarding-hero h1 {
    max-width: 100%;
  }

  .onboarding-steps {
    grid-template-columns: 1fr;
  }

  .onboarding-steps a {
    min-height: 0;
  }

  .public-hero {
    margin-bottom: 22px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 36px;
  }

  .stats article {
    padding: 19px 16px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .stats article:nth-child(2n) {
    border-right: 0;
  }

  .stats article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .stats article:last-child {
    border-bottom: 0;
  }

  .stats span {
    font-size: .64rem;
    letter-spacing: .1em;
  }

  .stats strong {
    margin: .45rem 0 .25rem;
    font-size: 1.55rem;
    line-height: 1.1;
  }

  .two-col,
  .help-layout,
  .help-quick-grid,
  .help-start-grid,
  .help-glossary,
  .project-grid,
  .gallery-grid,
  .form-grid,
  .details {
    grid-template-columns: 1fr;
  }

  .theme-choice-grid {
    grid-template-columns: 1fr;
  }

  .copy-link-row {
    grid-template-columns: 1fr;
  }

  .help-index {
    position: static;
  }

  .help-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .help-search-box {
    flex-direction: column;
  }

  .help-search-box .button {
    width: 100%;
  }

  .field.wide {
    grid-column: auto;
  }

  .filterbar,
  .searchbar {
    flex-direction: column;
  }

  .filterbar select,
  .filterbar input,
  .searchbar input,
  .filterbar .button,
  .searchbar .button {
    flex: 1 1 auto;
    width: 100%;
  }

  .check {
    align-self: flex-start;
    align-items: flex-start;
    white-space: normal;
  }

  .form-card,
  .panel,
  .info-card,
  .login-card {
    padding: 24px;
  }

  .form-card {
    border-radius: 14px;
  }

  .form-grid {
    gap: 18px;
  }

  .form-section {
    padding-bottom: 22px;
    margin-bottom: 22px;
  }

  .tattoo-form-card,
  .quote-item-card {
    padding: 16px;
  }

  .tattoo-attachment-grid {
    grid-template-columns: 1fr;
  }

  input,
  select,
  textarea {
    min-height: 48px;
    padding: .85rem .9rem;
    font-size: 1rem;
  }

  input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  input[type="file"] {
    min-height: 48px;
    font-size: .92rem;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-actions .button,
  .form-actions button {
    width: 100%;
  }

  .list-row,
  .calendar-row,
  .file-row,
  .payment-row {
    align-items: flex-start;
    gap: .75rem;
    padding: 15px 14px;
  }

  .list-row,
  .calendar-row,
  .file-row {
    flex-wrap: wrap;
  }

  .badge {
    font-size: .62rem;
  }

  .card-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }

  .messages {
    top: 86px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .file-preview-grid {
    grid-template-columns: 1fr;
  }

  .file-preview-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .table-wrap {
    overflow: visible;
  }

  .data-card {
    border: 0;
    background: none;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  tr {
    overflow: hidden;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(31, 34, 33, .9), rgba(20, 22, 22, .96));
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03);
  }

  tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  tr.clickable-row:hover td,
  tr.clickable-row.is-new td,
  tr.clickable-row.is-new:hover td {
    background: transparent;
  }

  tr.clickable-row.is-new {
    border-color: rgba(200, 165, 120, .36);
    background:
      linear-gradient(145deg, rgba(200, 165, 120, .12), rgba(20, 22, 22, .96)),
      var(--panel);
  }

  td {
    display: grid;
    grid-template-columns: minmax(82px, .36fr) minmax(0, 1fr);
    gap: .85rem;
    padding: .48rem 0;
    border-bottom: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  td > .badge {
    justify-self: start;
  }

  td.empty {
    display: block;
    padding: 24px;
  }

  td.empty::before {
    content: none;
  }
}

@media (max-width: 520px) {
  .shell,
  .auth-shell {
    width: min(100% - 20px, 1240px);
  }

  .form-card,
  .panel,
  .info-card,
  .login-card {
    padding: 20px;
  }

  .legal-hero,
  .legal-card {
    border-radius: var(--radius);
  }

  .legal-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .legal-actions .button {
    width: 100%;
  }

  .legal-settings-note {
    align-items: stretch;
    flex-direction: column;
  }

  .legal-settings-note .actions {
    flex-wrap: wrap;
  }

  .legal-settings-note .button {
    flex: 1 1 100%;
  }

  .legal-editor-grid .field.wide:has(.legal-textarea) {
    grid-column: 1 / -1;
  }

  .actions .button {
    flex-basis: 100%;
  }

  .stats {
    border-radius: 14px;
  }

  .stats article {
    padding: 17px 14px;
  }

  .file-preview-card {
    grid-template-columns: 1fr;
  }

  .file-preview-image {
    aspect-ratio: 16 / 11;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
