:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: #f7f8fa;
  --surface-strong: #eef1f5;
  --text: #111827;
  --text-muted: #5b6472;
  --border: transparent;
  --accent: #111827;
  --accent-soft: #eef2ff;
  --accent-text: #ffffff;
  --danger: #b42318;
  --success: #1d7a4f;
  --shadow: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #101827;
  --surface-strong: #172234;
  --text: #edf2f7;
  --text-muted: #a5b0be;
  --border: transparent;
  --accent: #e5edff;
  --accent-soft: #1a263d;
  --accent-text: #0b1220;
  --danger: #fca5a5;
  --success: #86efac;
  --shadow: none;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.02em;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 245, 247, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

:root[data-theme="dark"] .topbar {
  background: rgba(11, 18, 32, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--text);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.58rem 0.8rem;
  border: 1px solid transparent;
  transition: none;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  background: transparent;
  border-color: transparent;
}

.icon-btn,
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}

button:hover,
.btn:hover,
.icon-btn:hover {
  background: var(--surface-strong);
  border-color: transparent;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.inline-form { display: inline-flex; margin: 0; }
.menu-btn { display: none; }

main {
  padding: 2.2rem 0 3rem;
}

.page-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

h1, h2, h3 {
  margin: 0 0 0.75rem;
  letter-spacing: -0.05em;
  line-height: 1.12;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 3vw, 2.9rem);
}

h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.notice {
  border-left: 2px solid var(--accent);
  background: transparent;
  padding: 0.8rem 0;
  margin-bottom: 1rem;
  border-radius: 0;
}

.notice.error { border-left-color: var(--danger); }
.notice.success { border-left-color: var(--success); }

form {
  display: grid;
  gap: 0.8rem;
}

label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: var(--surface);
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font: inherit;
}

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

.small {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.table-wrap {
  overflow: auto;
}

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

th, td {
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.item {
  background: transparent;
  border: none;
  padding: 0.75rem 0;
}

.btn-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.badge {
  display: inline-block;
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(17, 24, 39, 0.08);
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

footer {
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding: 1.25rem 0 1.9rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  z-index: 50;
}

.drawer {
  position: absolute;
  right: 0;
  top: 0;
  width: min(320px, 80vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid rgba(17, 24, 39, 0.08);
  padding: 1rem;
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.drawer a,
.drawer button {
  text-align: left;
  width: 100%;
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 1rem, 1100px); }
  .topbar-inner { height: 4rem; }
  main { padding-top: 1.4rem; }
}


/* Private banking dashboard */
.banking-page { --banking-line: color-mix(in srgb, var(--text) 11%, transparent); --banking-soft: color-mix(in srgb, var(--surface-strong) 72%, transparent); max-width: 1060px; margin: 0 auto; }
.banking-page * { border-radius: 0 !important; }
.banking-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:1.5rem; padding:0 0 1.6rem; border-bottom:1px solid var(--banking-line); }
.banking-hero h1 { font-size:clamp(2.1rem,5vw,3.25rem); margin:.3rem 0 .55rem; letter-spacing:-.065em; }
.banking-hero p,.banking-section-intro { margin:0; max-width:42rem; }
.banking-eyebrow { display:block; color:var(--text-muted); font-size:.69rem; font-weight:800; letter-spacing:.11em; line-height:1.5; }
.banking-hero-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.banking-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:.68rem .9rem; border:1px solid var(--banking-line); font:inherit; font-size:.88rem; font-weight:750; text-decoration:none; cursor:pointer; transition:background .15s ease; }
.banking-button-primary { background:var(--accent); color:var(--accent-text); border-color:var(--accent); }
.banking-button-primary:hover { opacity:.88; }
.banking-button-muted { background:var(--surface); color:var(--text); }
.banking-button-muted:hover { background:var(--surface-strong); }
.banking-button:disabled { opacity:.45; cursor:not-allowed; }
.banking-summary-grid { display:grid; grid-template-columns:2fr repeat(3,minmax(0,1fr)); gap:.7rem; margin:1.2rem 0; }
.banking-summary-card { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:.4rem; min-width:0; padding:1.05rem; border:1px solid var(--banking-line); background:var(--surface); }
.banking-summary-card span,.banking-summary-card small { color:var(--text-muted); font-size:.8rem; }
.banking-summary-card strong { font-size:clamp(1.25rem,2.5vw,1.8rem); line-height:1.15; letter-spacing:-.045em; overflow-wrap:anywhere; }
.banking-summary-main { background:var(--surface-strong); }
.banking-summary-main strong { font-size:clamp(1.7rem,3.2vw,2.45rem); }
.banking-jump-nav { display:flex; gap:.35rem; overflow-x:auto; padding:.25rem 0 1.25rem; scrollbar-width:thin; }
.banking-jump-nav a { flex:0 0 auto; padding:.58rem .8rem; background:var(--surface-strong); color:var(--text); font-size:.85rem; font-weight:750; }
.banking-section { padding:1.5rem 0 1.7rem; border-top:1px solid var(--banking-line); scroll-margin-top:5.5rem; }
.banking-section-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.banking-section-heading h2 { margin:.2rem 0 0; font-size:clamp(1.45rem,3vw,1.9rem); }
.banking-count { display:grid; place-items:center; min-width:2rem; height:2rem; padding:0 .5rem; background:var(--surface-strong); font-size:.8rem; font-weight:800; }
.banking-account-grid,.banking-loan-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.7rem; }
.banking-account-card,.banking-loan-card { min-width:0; padding:1.1rem; border:1px solid var(--banking-line); background:var(--surface); }
.banking-account-top,.banking-loan-head { display:flex; justify-content:space-between; align-items:flex-start; gap:.8rem; }
.banking-account-card h3,.banking-loan-card h3 { margin:.25rem 0 0; font-size:1.08rem; overflow-wrap:anywhere; }
.banking-currency { padding:.2rem .4rem; background:var(--surface-strong); color:var(--text-muted); font-size:.75rem; font-weight:800; }
.banking-balance { margin:.85rem 0 .15rem; color:var(--text); font-size:1.85rem; font-weight:800; letter-spacing:-.055em; overflow-wrap:anywhere; }
.banking-muted { color:var(--text-muted); font-size:.84rem; margin:.35rem 0 .8rem; overflow-wrap:anywhere; }
.banking-inline-form { display:flex; margin-top:.8rem; }
.banking-inline-form .banking-button { min-height:36px; padding:.4rem .65rem; font-size:.78rem; }
.banking-empty { padding:1.2rem; border:1px dashed var(--banking-line); }
.banking-empty strong { display:block; margin-bottom:.25rem; }
.banking-empty p { margin:0; font-size:.9rem; }
.banking-details { margin-top:1rem; border:1px solid var(--banking-line); background:var(--surface); }
.banking-details summary { display:flex; align-items:center; gap:.6rem; padding:1rem; cursor:pointer; font-weight:800; list-style:none; }
.banking-details summary::-webkit-details-marker { display:none; }
.banking-plus { display:grid; place-items:center; width:1.7rem; height:1.7rem; background:var(--surface-strong); font-size:1.1rem; }
.banking-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.9rem; padding:0 1rem 1rem; align-items:end; }
.banking-form label,.banking-filter label { min-width:0; margin:0; font-size:.83rem; }
.banking-form input,.banking-form select,.banking-filter input { display:block; margin-top:.35rem; min-height:46px; border:1px solid var(--banking-line); background:var(--bg); }
.banking-form input:focus,.banking-form select:focus,.banking-filter input:focus { outline:2px solid var(--text-muted); outline-offset:1px; }
.banking-form .banking-button { min-height:46px; width:100%; }
.banking-field-wide { grid-column:1/-1; }
.banking-form-hint { grid-column:1/-1; margin:0; font-size:.82rem; }
.banking-filter { display:flex; align-items:flex-end; gap:.65rem; margin-bottom:1rem; }
.banking-filter label { flex:0 1 230px; }
.banking-filter input { min-height:44px; }
.banking-clear-filter { padding:.6rem .2rem; font-size:.85rem; text-decoration:underline; }
.banking-transaction-list { border-top:1px solid var(--banking-line); }
.banking-transaction { display:flex; align-items:center; gap:.8rem; padding:.9rem .2rem; border-bottom:1px solid var(--banking-line); }
.banking-transaction-mark { display:grid; flex:0 0 2.4rem; height:2.4rem; place-items:center; background:var(--surface-strong); font-size:1.2rem; font-weight:800; }
.banking-transaction-mark.is-income { color:var(--success); }
.banking-transaction-mark.is-expense { color:var(--danger); }
.banking-transaction-main { display:flex; flex:1; flex-direction:column; min-width:0; gap:.12rem; }
.banking-transaction-main strong { overflow-wrap:anywhere; }
.banking-transaction-main span { color:var(--text-muted); font-size:.8rem; overflow-wrap:anywhere; }
.banking-transaction-side { display:flex; flex-direction:column; align-items:flex-end; gap:.35rem; text-align:right; }
.banking-transaction-side strong { white-space:nowrap; font-size:.93rem; }
.banking-transaction-side .banking-inline-form { margin:0; }
.banking-transaction-side .banking-button { border:0; padding:.2rem 0; min-height:30px; background:transparent; color:var(--text-muted); text-decoration:underline; }
.banking-transfer-form { margin-top:1rem; padding:1rem; border:1px solid var(--banking-line); background:var(--surface); }
.banking-loan-grid { margin-bottom:1rem; }
.banking-loan-open { max-width:50%; text-align:right; font-size:.92rem; font-weight:800; overflow-wrap:anywhere; }
.banking-loan-meta { display:flex; flex-wrap:wrap; gap:.45rem 1rem; margin:.9rem 0; color:var(--text-muted); font-size:.8rem; }
.banking-loan-meta strong { color:var(--text); }
.banking-repayment-form { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; margin-top:.9rem; }
.banking-repayment-form label:last-of-type { grid-column:1/-1; }
.banking-card-footer { border-top:1px solid var(--banking-line); margin-top:.8rem; }
.banking-private-note { padding:1rem 0; border-top:1px solid var(--banking-line); color:var(--text-muted); font-size:.8rem; }
@media (max-width:760px) {
  .banking-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .banking-summary-main { grid-column:1/-1; }
  .banking-hero { align-items:flex-start; flex-direction:column; gap:1rem; }
  .banking-hero-actions { width:100%; }
  .banking-hero-actions .banking-button { flex:1; }
}
@media (max-width:520px) {
  .banking-page { width:100%; }
  .banking-hero { padding-bottom:1.1rem; }
  .banking-hero-actions .banking-button { flex:1 1 40%; font-size:.8rem; padding:.65rem .45rem; }
  .banking-summary-grid { gap:.5rem; margin:1rem 0; }
  .banking-summary-card { padding:.8rem; }
  .banking-summary-card strong { font-size:1.35rem; }
  .banking-summary-main strong { font-size:1.8rem; }
  .banking-account-grid,.banking-loan-grid { grid-template-columns:1fr; }
  .banking-account-card,.banking-loan-card { padding:.9rem; }
  .banking-form { grid-template-columns:1fr; gap:.8rem; padding:0 .85rem .85rem; }
  .banking-field-wide,.banking-form-hint { grid-column:auto; }
  .banking-details summary { padding:.85rem; }
  .banking-filter { align-items:stretch; flex-wrap:wrap; }
  .banking-filter label { flex:1 1 100%; }
  .banking-filter .banking-button { flex:1; }
  .banking-transaction { gap:.55rem; align-items:flex-start; }
  .banking-transaction-mark { flex-basis:2rem; height:2rem; }
  .banking-transaction-side strong { font-size:.82rem; white-space:normal; }
  .banking-loan-head { flex-direction:column; }
  .banking-loan-open { max-width:none; text-align:left; }
  .banking-repayment-form { grid-template-columns:1fr; }
  .banking-repayment-form label:last-of-type { grid-column:auto; }
}


/* Einheitliches, reduziertes Design: klare Typografie, flache Flächen, gezielte Trennlinien. */
:root {
  --border: transparent;
  --shadow: none;
}
.page-card,
.grid > .page-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.item {
  border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  padding: 1rem 0;
}
.badge {
  border: 0;
  background: var(--surface-strong);
}
button,
.btn,
.icon-btn {
  border-color: transparent;
  box-shadow: none;
}
button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--text-muted);
  outline-offset: 3px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 25%, transparent);
  background: transparent;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus {
  border-bottom-color: var(--text);
  outline: none;
}
.account-settings {
  max-width: 42rem;
  margin: 0 auto;
}
.account-settings .eyebrow {
  display: block;
  margin-bottom: .55rem;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.account-settings h1 { margin-bottom: .8rem; }
.account-password-form {
  margin-top: 1.5rem;
  gap: 1.1rem;
}
.account-password-form button { justify-self: start; margin-top: .3rem; }
.banking-summary-card,
.banking-account-card,
.banking-loan-card,
.banking-details,
.banking-transfer-form {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.banking-summary-card {
  padding: .9rem .7rem .9rem 0;
  border-bottom: 1px solid var(--banking-line);
}
.banking-summary-main { background: transparent; }
.banking-account-grid,
.banking-loan-grid { gap: 1.25rem; }
.banking-account-card,
.banking-loan-card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--banking-line);
}
.banking-details {
  margin-top: 1rem;
  border-top: 1px solid var(--banking-line);
  border-bottom: 1px solid var(--banking-line);
}
.banking-details summary { padding-left: 0; padding-right: 0; }
.banking-plus,
.banking-count,
.banking-currency,
.banking-jump-nav a {
  background: transparent;
}
.banking-jump-nav a {
  padding-left: 0;
  padding-right: .9rem;
  border-bottom: 2px solid var(--banking-line);
}
.banking-transfer-form { padding: 1rem 0; }
.banking-form input,
.banking-form select,
.banking-filter input {
  background: transparent;
}
.banking-empty {
  border: 0;
  border-top: 1px solid var(--banking-line);
  border-bottom: 1px solid var(--banking-line);
  padding: 1rem 0;
}
.banking-button-muted {
  border: 0;
  background: var(--surface-strong);
}
.banking-button-primary {
  border: 0;
}
.table-wrap { max-width: 100%; }
@media (max-width: 760px) {
  .account-password-form button { width: 100%; }
  .table-wrap table { min-width: 720px; }
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-width: 1rem;
  min-height: 1rem;
  accent-color: var(--accent);
}


/* Projects — editorial, angular project archive */
.projects-page { --projects-line: color-mix(in srgb, var(--text) 14%, transparent); max-width: 1120px; margin: 0 auto; }
.projects-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,250px); gap:2rem; align-items:end; padding:2.2rem 0 2.5rem; border-bottom:1px solid var(--projects-line); }
.projects-hero-copy { max-width:740px; }
.projects-eyebrow { display:flex; align-items:center; gap:.55rem; color:var(--text-muted); font-size:.7rem; font-weight:800; letter-spacing:.13em; }
.projects-live-dot { display:inline-block; width:.48rem; height:.48rem; background:var(--success); }
.projects-hero h1 { margin:1.3rem 0 1rem; font-size:clamp(3rem,7vw,6.2rem); line-height:.91; letter-spacing:-.085em; font-weight:850; }
.projects-hero h1 span { color:var(--text-muted); }
.projects-hero-copy > p { max-width:38rem; font-size:1rem; line-height:1.8; margin:1.2rem 0 0; }
.projects-hero-index { display:flex; flex-direction:column; align-items:flex-start; padding:1.1rem 0 0 1.2rem; border-left:1px solid var(--projects-line); }
.projects-hero-index > span,.projects-hero-index > small { color:var(--text-muted); font-size:.68rem; font-weight:800; letter-spacing:.12em; }
.projects-hero-index > strong { font-size:clamp(4rem,7vw,6.2rem); line-height:1; letter-spacing:-.09em; margin:.5rem 0; }
.projects-index-rule { width:100%; height:1px; background:var(--projects-line); margin:1rem 0; }
.projects-toolbar { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1.35rem 0; border-bottom:1px solid var(--projects-line); }
.projects-count { display:flex; align-items:baseline; gap:.55rem; font-size:.9rem; font-weight:750; }
.projects-count > strong { font-size:1.45rem; letter-spacing:-.05em; }
.projects-count-muted { color:var(--text-muted); font-weight:400; }
.projects-search { display:flex; align-items:center; gap:.6rem; width:min(100%,330px); margin:0; padding:.15rem 0; border-bottom:1px solid var(--projects-line); }
.projects-search > span:first-child { font-size:1.5rem; color:var(--text-muted); line-height:1; }
.projects-search input { min-width:0; border:0 !important; outline:0; padding:.6rem 0; background:transparent; }
.projects-search kbd { flex:0 0 auto; border:1px solid var(--projects-line); padding:.05rem .35rem; color:var(--text-muted); font-size:.72rem; }
.projects-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:2rem; row-gap:2.7rem; padding:1.8rem 0 2.5rem; }
.projects-card { min-width:0; border-bottom:1px solid var(--projects-line); padding-bottom:1.5rem; }
.projects-card-visual { display:block; position:relative; overflow:hidden; aspect-ratio:16/9; background:var(--surface-strong); }
.projects-card-image { display:block; width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.projects-card-visual:hover .projects-card-image { transform:scale(1.025); }
.projects-card-placeholder { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:space-between; padding:1.2rem; background:linear-gradient(135deg,var(--surface-strong),var(--bg)); color:var(--text-muted); }
.projects-card-placeholder span,.projects-card-placeholder small { font-size:.65rem; font-weight:800; letter-spacing:.13em; }
.projects-card-placeholder strong { font-size:clamp(5rem,11vw,8rem); line-height:.8; font-weight:850; letter-spacing:-.1em; color:color-mix(in srgb,var(--text) 24%,transparent); }
.projects-card-open { position:absolute; right:.7rem; bottom:.7rem; display:flex; gap:.7rem; align-items:center; padding:.5rem .65rem; background:var(--bg); color:var(--text); font-size:.76rem; font-weight:750; }
.projects-card-content { padding-top:1.15rem; }
.projects-card-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.5rem; color:var(--text-muted); font-size:.64rem; font-weight:800; letter-spacing:.08em; }
.projects-card h2 { margin:.8rem 0 .6rem; font-size:clamp(1.45rem,3vw,2.15rem); letter-spacing:-.06em; }
.projects-card h2 a:hover { text-decoration:underline; text-underline-offset:4px; }
.projects-card-description { min-height:3.2em; margin:0; font-size:.91rem; line-height:1.75; }
.projects-card-footer { display:flex; justify-content:space-between; align-items:center; gap:.8rem; margin-top:1.25rem; padding-top:.9rem; border-top:1px solid var(--projects-line); color:var(--text-muted); font-size:.76rem; }
.projects-card-footer > span { overflow-wrap:anywhere; }
.projects-card-link { color:var(--text); font-weight:800; white-space:nowrap; }
.projects-card-link span { display:inline-block; margin-left:.25rem; transition:transform .15s ease; }
.projects-card-link:hover span { transform:translateX(3px); }
.projects-empty { grid-column:1/-1; padding:2.5rem 0; border-top:1px solid var(--projects-line); border-bottom:1px solid var(--projects-line); }
.projects-empty-index { color:var(--text-muted); font-size:.7rem; font-weight:800; letter-spacing:.12em; }
.projects-empty h2 { margin:.8rem 0 .5rem; font-size:2rem; }
.projects-empty p { margin:0; }
.projects-no-results { padding:1.5rem 0; border-bottom:1px solid var(--projects-line); }
.projects-create { border-top:1px solid var(--projects-line); border-bottom:1px solid var(--projects-line); margin:0 0 2rem; }
.projects-create summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.15rem 0; cursor:pointer; list-style:none; }
.projects-create summary::-webkit-details-marker { display:none; }
.projects-create summary > span:first-child { display:flex; flex-direction:column; gap:.2rem; }
.projects-create summary strong { font-size:1rem; }
.projects-create summary small { color:var(--text-muted); font-size:.82rem; font-weight:400; }
.projects-create-plus { display:grid; place-items:center; width:2rem; height:2rem; background:var(--surface-strong); font-size:1.4rem; transition:transform .15s ease; }
.projects-create[open] .projects-create-plus { transform:rotate(45deg); }
.projects-create-form { padding:0 0 1.5rem; max-width:46rem; }
.projects-create-form label { font-size:.82rem; }
.projects-create-form input,.projects-create-form textarea { background:transparent; }
.projects-create-form button { justify-self:start; margin-top:.3rem; }
.projects-bottomline { display:flex; justify-content:space-between; flex-wrap:wrap; gap:.5rem 1rem; padding:1rem 0 0; border-top:1px solid var(--projects-line); color:var(--text-muted); font-size:.65rem; font-weight:800; letter-spacing:.1em; }
.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:760px) {
  .projects-hero { grid-template-columns:1fr; gap:1.6rem; padding:1.2rem 0 1.8rem; }
  .projects-hero h1 { font-size:clamp(3rem,13vw,5rem); }
  .projects-hero-index { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:.25rem 1rem; padding:0; border:0; }
  .projects-hero-index > strong { grid-column:1; grid-row:2/4; font-size:3rem; margin:0; }
  .projects-hero-index > span { grid-column:1; }
  .projects-hero-index > small:last-child { grid-column:2; grid-row:3; }
  .projects-index-rule { display:none; }
  .projects-toolbar { align-items:flex-start; flex-direction:column; gap:.7rem; }
  .projects-search { width:100%; }
  .projects-grid { grid-template-columns:1fr; gap:1.8rem; padding-top:1.2rem; }
  .projects-card-description { min-height:0; }
}
@media (prefers-reduced-motion:reduce) {
  .projects-card-image,.projects-card-link span,.projects-create-plus { transition:none; }
}


/* Studio CMS — flat editorial management workspace */
.studio-page { max-width: 1120px; margin: 0 auto; }
.studio-hero { padding: 2.5rem 0 2rem; border-bottom: 1px solid color-mix(in srgb,var(--text) 15%,transparent); }
.studio-kicker { display:block; color:var(--text-muted); font-size:.68rem; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
.studio-hero h1 { margin:.8rem 0; font-size:clamp(3.5rem,9vw,6rem); line-height:.9; letter-spacing:-.09em; }
.studio-hero h1 span { color:var(--text-muted); }
.studio-hero p { max-width:42rem; line-height:1.75; color:var(--text-muted); }
.studio-stats { display:flex; gap:clamp(1.5rem,5vw,4rem); margin-top:2rem; }
.studio-stats div { display:flex; flex-direction:column; gap:.25rem; }
.studio-stats strong { font-size:2rem; letter-spacing:-.06em; }
.studio-stats span,.studio-meta { color:var(--text-muted); font-size:.78rem; }
.studio-nav { display:flex; flex-wrap:wrap; gap:1.25rem; padding:1rem 0; border-bottom:1px solid color-mix(in srgb,var(--text) 15%,transparent); }
.studio-nav a,.studio-entry-heading a,.studio-entry > a { font-size:.8rem; font-weight:750; }
.studio-section { padding:2rem 0; border-bottom:1px solid color-mix(in srgb,var(--text) 15%,transparent); scroll-margin-top:1rem; }
.studio-section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.studio-section-heading h2 { margin:0; font-size:clamp(1.5rem,4vw,2.2rem); letter-spacing:-.06em; }
.studio-entry { padding:1.25rem 0; border-top:1px solid color-mix(in srgb,var(--text) 12%,transparent); }
.studio-entry-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; }
.studio-entry-heading h3,.studio-entry > h3 { margin:.35rem 0; font-size:1.2rem; letter-spacing:-.035em; overflow-wrap:anywhere; }
.studio-entry .studio-meta { margin:.35rem 0 1rem; }
.studio-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem 1.2rem; align-items:end; margin-top:1rem; }
.studio-form label { min-width:0; font-size:.8rem; font-weight:650; }
.studio-form input:not([type="checkbox"]):not([type="file"]),.studio-form select,.studio-form textarea { display:block; width:100%; min-width:0; margin-top:.35rem; padding:.7rem 0; }
.studio-form textarea { min-height:6rem; resize:vertical; line-height:1.55; }
.studio-form input[type="file"] { display:block; max-width:100%; margin-top:.5rem; font-size:.8rem; }
.studio-form button { justify-self:start; align-self:end; }
.studio-form .studio-check { display:flex; align-items:center; gap:.55rem; }
.studio-form .studio-check input { margin:0; }
.studio-subsection { margin-top:1rem; border-top:1px solid color-mix(in srgb,var(--text) 12%,transparent); }
.studio-subsection summary { cursor:pointer; padding:1rem 0 .25rem; font-size:.85rem; font-weight:750; }
.studio-subsection .studio-form + .studio-form { margin-top:1.5rem; padding-top:1rem; border-top:1px dashed color-mix(in srgb,var(--text) 15%,transparent); }
.studio-page-editors { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2rem; }
.studio-page-editors .studio-entry { min-width:0; }
.content-page { max-width:800px; margin:0 auto; padding:clamp(1.5rem,6vw,4rem) 0; }
.content-page .eyebrow { display:block; margin-bottom:1.2rem; color:var(--text-muted); font-size:.7rem; font-weight:800; letter-spacing:.13em; }
.content-page h1 { font-size:clamp(2.7rem,7vw,5rem); line-height:.95; letter-spacing:-.08em; }
.content-page-body { white-space:normal; line-height:1.9; font-size:1.03rem; overflow-wrap:anywhere; }
@media(max-width:720px) {
  .studio-hero { padding-top:1.5rem; }
  .studio-section-heading { align-items:flex-start; flex-direction:column; }
  .studio-form,.studio-page-editors { grid-template-columns:1fr; }
  .studio-form button { width:100%; }
  .studio-stats { justify-content:space-between; gap:.75rem; }
  .studio-stats strong { font-size:1.65rem; }
  .studio-nav { gap:.75rem 1rem; }
}


/* Code and Design content library */
.library-section { margin-top: 2.5rem; }
.library-heading { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; margin-bottom:1rem; border-bottom:1px solid color-mix(in srgb,var(--text) 15%,transparent); padding-bottom:.8rem; }
.library-heading h2 { margin:0; font-size:clamp(1.5rem,4vw,2.2rem); letter-spacing:-.06em; }
.library-heading > span,.library-item-id { color:var(--text-muted); font-size:.75rem; }
.library-filters { display:flex; flex-wrap:wrap; gap:.55rem; margin:1rem 0 1.5rem; }
.library-filters a { display:inline-flex; padding:.55rem .8rem; border:1px solid color-mix(in srgb,var(--text) 18%,transparent); color:var(--text-muted); font-size:.78rem; font-weight:700; text-decoration:none; }
.library-filters a:hover,.library-filters a.is-active { color:var(--text); border-color:var(--text); }
.library-item { min-width:0; padding:1.4rem 0; border-top:1px solid color-mix(in srgb,var(--text) 13%,transparent); }
.library-item-top { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.library-kind { display:inline-flex; padding:.25rem .5rem; border:1px solid color-mix(in srgb,var(--text) 20%,transparent); font-size:.68rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.library-item h2 { margin:.8rem 0 .45rem; font-size:clamp(1.25rem,3vw,1.7rem); letter-spacing:-.04em; overflow-wrap:anywhere; }
.library-summary { color:var(--text-muted); line-height:1.65; }
.library-item-body { line-height:1.75; overflow-wrap:anywhere; }
.library-code { overflow:auto; max-width:100%; margin:1rem 0; padding:1rem; background:color-mix(in srgb,var(--text) 5%,transparent); border:1px solid color-mix(in srgb,var(--text) 13%,transparent); font-size:.82rem; line-height:1.6; white-space:pre; }
.library-code code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.library-asset-link a,.library-edit-link a,.library-admin-link a { font-size:.82rem; font-weight:750; }
.library-tags { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:1rem; }
.library-tags span { padding:.25rem .45rem; color:var(--text-muted); border:1px solid color-mix(in srgb,var(--text) 12%,transparent); font-size:.7rem; }
.library-empty { padding:1.4rem 0; border-top:1px solid color-mix(in srgb,var(--text) 13%,transparent); }
.library-empty h2 { margin:.2rem 0; font-size:1.15rem; }
.library-empty p { color:var(--text-muted); }
.library-editor { margin-top:1rem; }
.library-wide { grid-column:1/-1; }
.library-manage-entry { padding-bottom:1.5rem; }
.library-manage-entry .studio-entry-heading { align-items:baseline; }
.library-editor button + button { margin-left:.5rem; }
@media(max-width:720px) {
  .library-heading { align-items:flex-start; flex-direction:column; }
  .library-wide { grid-column:auto; }
  .library-editor button + button { margin:.5rem 0 0; }
}


.library-delete-form { margin-top:.65rem; }
.library-delete-form .btn-secondary { cursor:pointer; }
.library-editor input[type="file"] { max-width:100%; padding:.7rem; }
.library-asset-link { overflow-wrap:anywhere; }


/* Homepage carousel and content editor */
.home-page { max-width:1120px; margin:0 auto; }
.home-intro { padding:clamp(2rem,7vw,5.5rem) 0 2rem; }
.home-intro h1 { margin:.9rem 0 1rem; font-size:clamp(3.3rem,10vw,7.2rem); line-height:.88; letter-spacing:-.095em; overflow-wrap:anywhere; }
.home-intro h1 span { color:var(--text-muted); }
.home-intro-copy { max-width:760px; color:var(--text-muted); line-height:1.8; }
.home-intro-copy h2,.content-page-body h2 { margin:1.6rem 0 .6rem; color:var(--text); font-size:clamp(1.4rem,3vw,2rem); letter-spacing:-.055em; }
.home-intro-copy h3,.content-page-body h3 { margin:1.2rem 0 .45rem; color:var(--text); font-size:1.15rem; }
.home-carousel { position:relative; overflow:hidden; background:#111; color:#fff; margin:1rem 0 0; isolation:isolate; }
.home-carousel-slides { position:relative; min-height:clamp(390px,54vw,610px); }
.home-slide { position:absolute; inset:0; display:flex; align-items:flex-end; padding:clamp(1.5rem,5vw,4.5rem); opacity:0; visibility:hidden; transform:scale(1.015); transition:opacity .55s ease,transform .8s ease,visibility .55s; background:#181818; }
.home-slide.is-active { position:relative; opacity:1; visibility:visible; transform:scale(1); }
.home-slide-backdrop { position:absolute; inset:0; z-index:-2; background-image:var(--slide-image,linear-gradient(135deg,#2d2d2d,#101010 65%,#363636)); background-size:cover; background-position:center; }
.home-slide-backdrop:after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(0,0,0,.82),rgba(0,0,0,.45) 60%,rgba(0,0,0,.12)),linear-gradient(0deg,rgba(0,0,0,.38),transparent 60%); }
.home-slide-content { max-width:760px; }
.home-slide-kicker { display:block; margin-bottom:1.1rem; font-size:.68rem; font-weight:800; letter-spacing:.16em; color:rgba(255,255,255,.7); }
.home-slide h2 { margin:0 0 .8rem; font-size:clamp(2.6rem,7vw,5.8rem); line-height:.92; letter-spacing:-.085em; overflow-wrap:anywhere; }
.home-slide p { max-width:620px; margin:0 0 1.5rem; color:rgba(255,255,255,.82); font-size:clamp(.95rem,2vw,1.1rem); line-height:1.75; }
.home-slide a { display:inline-flex; gap:1rem; align-items:center; padding:.8rem 0; border-bottom:1px solid rgba(255,255,255,.7); color:#fff; font-size:.85rem; font-weight:800; }
.home-carousel-controls { display:flex; align-items:center; gap:1.2rem; padding:1rem clamp(1rem,3vw,2rem); background:#111; }
.home-carousel-count { font-size:.75rem; color:rgba(255,255,255,.6); white-space:nowrap; }
.home-carousel-count strong { color:#fff; }
.home-carousel-dots { display:flex; justify-content:center; flex:1; gap:.45rem; }
.home-carousel-dots button { width:1.6rem; height:3px; min-height:3px; padding:0; border:0; background:rgba(255,255,255,.3); cursor:pointer; }
.home-carousel-dots button[aria-current="true"] { background:#fff; }
.home-carousel-arrows { display:flex; gap:.45rem; }
.home-carousel-arrows button { width:2.3rem; height:2.3rem; min-height:2.3rem; border:1px solid rgba(255,255,255,.28); color:#fff; background:transparent; cursor:pointer; }
.home-quick-links { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:1.5rem 0 2.5rem; border-top:1px solid color-mix(in srgb,var(--text) 16%,transparent); border-bottom:1px solid color-mix(in srgb,var(--text) 16%,transparent); }
.home-quick-links a { display:flex; justify-content:space-between; gap:.7rem; padding:1.1rem .9rem 1.1rem 0; font-size:.85rem; font-weight:750; }
.home-quick-links a+a { padding-left:1rem; border-left:1px solid color-mix(in srgb,var(--text) 16%,transparent); }
.home-private-links { display:flex; flex-wrap:wrap; gap:1rem; margin-top:1rem; }
.home-private-links a,.content-private-link a { font-size:.82rem; font-weight:750; }
.content-page-image { margin:1.3rem 0; }
.content-page-image img { display:block; width:100%; max-height:650px; object-fit:cover; }
.content-page-image figcaption { margin-top:.45rem; color:var(--text-muted); font-size:.75rem; }
.page-builder-form { align-items:start; }
.studio-hint { color:var(--text-muted); font-size:.8rem; line-height:1.65; }
.studio-hint code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.page-image-list { display:flex; flex-wrap:wrap; gap:.5rem; color:var(--text-muted); font-size:.75rem; }
.page-image-list span { border-bottom:1px solid color-mix(in srgb,var(--text) 16%,transparent); padding:.35rem 0; }
@media(max-width:650px) {
  .home-carousel-slides { min-height:480px; }
  .home-slide { padding:1.35rem; }
  .home-slide h2 { font-size:clamp(2.5rem,12vw,4rem); }
  .home-carousel-controls { gap:.7rem; padding:.8rem; }
  .home-quick-links { grid-template-columns:1fr; }
  .home-quick-links a { padding:.85rem 0; }
  .home-quick-links a+a { padding-left:0; border-left:0; border-top:1px solid color-mix(in srgb,var(--text) 16%,transparent); }
}
@media(prefers-reduced-motion:reduce) {
  .home-slide { transition:none; transform:none; }
}


/* Studio workspace redesign — editorial, project-first and mobile-friendly */
.studio-dashboard { max-width:1240px; }
.studio-dashboard-hero { display:grid; grid-template-columns:minmax(0,1fr) 220px; align-items:center; gap:2rem; padding:clamp(2.4rem,6vw,5rem) 0 2.5rem; }
.studio-dashboard-hero h1 { max-width:850px; font-size:clamp(3.2rem,8vw,6.8rem); }
.studio-dashboard-hero p { max-width:38rem; font-size:1rem; }
.studio-hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.7rem; margin-top:1.5rem; }
.studio-hero-actions .btn-primary,.studio-hero-actions .btn-secondary { display:inline-flex; align-items:center; gap:.75rem; text-decoration:none; }
.studio-hero-mark { display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; min-height:210px; padding:1.1rem; background:var(--accent); color:var(--accent-text); }
.studio-hero-mark span { font-size:5.4rem; line-height:.85; font-weight:850; letter-spacing:-.12em; }
.studio-hero-mark small { align-self:flex-end; font-size:.63rem; line-height:1.4; font-weight:800; letter-spacing:.13em; }
.studio-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-top:1px solid color-mix(in srgb,var(--text) 18%,transparent); border-bottom:1px solid color-mix(in srgb,var(--text) 18%,transparent); }
.studio-overview-item { display:flex; flex-direction:column; gap:.45rem; min-width:0; padding:1.1rem 1.1rem 1.2rem 0; text-decoration:none; }
.studio-overview-item + .studio-overview-item { padding-left:1.1rem; border-left:1px solid color-mix(in srgb,var(--text) 13%,transparent); }
.studio-overview-item > span { color:var(--text-muted); font-size:.62rem; font-weight:800; letter-spacing:.11em; }
.studio-overview-item strong { font-size:clamp(1.8rem,3vw,2.65rem); line-height:1; letter-spacing:-.07em; }
.studio-overview-item small { display:flex; align-items:center; justify-content:space-between; gap:.5rem; color:var(--text-muted); font-size:.73rem; }
.studio-overview-item b { color:var(--text); font-size:.95rem; }
.studio-overview-item:hover small { color:var(--text); }
.studio-workspace-nav { position:sticky; top:4.25rem; z-index:20; display:flex; gap:1.3rem; flex-wrap:wrap; padding:1rem 0; background:var(--bg); border-bottom:1px solid color-mix(in srgb,var(--text) 16%,transparent); }
.studio-workspace-nav a { font-size:.78rem; font-weight:750; color:var(--text-muted); }
.studio-workspace-nav a:hover { color:var(--text); }
.studio-dashboard .studio-section { padding:clamp(2.5rem,5vw,4.5rem) 0; scroll-margin-top:7.5rem; }
.studio-dashboard .studio-section-heading { align-items:flex-end; margin-bottom:1.5rem; }
.studio-dashboard .studio-section-heading h2 { margin:.35rem 0 .5rem; font-size:clamp(2rem,5vw,3.5rem); letter-spacing:-.075em; line-height:1; }
.studio-dashboard .studio-section-heading p { max-width:43rem; margin:.5rem 0 0; color:var(--text-muted); font-size:.88rem; line-height:1.7; }
.studio-heading-muted { color:var(--text-muted); font-size:.65em; font-weight:450; }
.studio-create-project { margin:1.5rem 0 2rem; border-top:1px solid color-mix(in srgb,var(--text) 18%,transparent); border-bottom:1px solid color-mix(in srgb,var(--text) 18%,transparent); }
.studio-create-project summary { display:grid; grid-template-columns:2.6rem minmax(0,1fr) auto; align-items:center; gap:1rem; padding:1rem 0; cursor:pointer; list-style:none; }
.studio-create-project summary::-webkit-details-marker { display:none; }
.studio-create-icon { display:grid; place-items:center; width:2.5rem; height:2.5rem; background:var(--accent); color:var(--accent-text); font-size:1.35rem; }
.studio-create-project summary strong,.studio-create-project summary small { display:block; }
.studio-create-project summary strong { font-size:.9rem; }
.studio-create-project summary small { margin-top:.15rem; color:var(--text-muted); font-size:.75rem; font-weight:400; }
.studio-create-arrow { font-weight:800; }
.studio-create-project[open] .studio-create-arrow { transform:rotate(45deg); }
.studio-create-project > .studio-form { max-width:850px; padding:0 0 1.5rem 3.5rem; }
.studio-project-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2.8rem 2rem; }
.studio-project-card { min-width:0; }
.studio-project-visual { position:relative; min-height:200px; aspect-ratio:16/8.5; overflow:hidden; background:var(--surface-strong); }
.studio-project-thumb { display:block; width:100%; height:100%; min-height:200px; object-fit:cover; }
.studio-project-placeholder { display:flex; flex-direction:column; justify-content:space-between; align-items:flex-start; padding:1.2rem; color:var(--text); background:linear-gradient(135deg,var(--surface-strong),var(--bg)); }
.studio-project-placeholder span { font-size:clamp(3rem,6vw,5.5rem); font-weight:850; letter-spacing:-.1em; line-height:.9; }
.studio-project-placeholder small { font-size:.62rem; font-weight:800; letter-spacing:.15em; }
.studio-project-index { position:absolute; top:.8rem; left:.8rem; padding:.4rem .5rem; background:var(--bg); color:var(--text); font-size:.61rem; font-weight:800; letter-spacing:.09em; }
.studio-project-main { padding-top:1rem; }
.studio-project-main .studio-entry-heading { align-items:flex-start; }
.studio-project-main .studio-entry-heading h3 { margin:.35rem 0 .55rem; font-size:clamp(1.35rem,3vw,2rem); line-height:1.1; letter-spacing:-.06em; }
.studio-project-main .studio-entry-heading a { white-space:nowrap; padding-top:.25rem; }
.studio-project-description { margin:.25rem 0 1rem; color:var(--text-muted); font-size:.86rem; line-height:1.7; overflow-wrap:anywhere; }
.studio-project-metrics { display:flex; flex-wrap:wrap; gap:.6rem 1rem; padding:.75rem 0; border-top:1px solid color-mix(in srgb,var(--text) 13%,transparent); color:var(--text-muted); font-size:.7rem; font-weight:700; }
.studio-project-metrics span + span { padding-left:1rem; border-left:1px solid color-mix(in srgb,var(--text) 13%,transparent); }
.studio-edit-details { border-top:1px solid color-mix(in srgb,var(--text) 18%,transparent); }
.studio-edit-details > summary,.studio-record-edit > summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem 0; cursor:pointer; font-size:.78rem; font-weight:800; list-style:none; }
.studio-edit-details > summary::-webkit-details-marker,.studio-record-edit > summary::-webkit-details-marker { display:none; }
.studio-edit-details > summary span { font-size:1.15rem; }
.studio-edit-details[open] > summary span { transform:rotate(45deg); }
.studio-edit-panel { padding:0 0 1rem; }
.studio-edit-panel .studio-form { margin-top:.4rem; }
.studio-edit-panel .studio-image-form { padding-top:1rem; border-top:1px solid color-mix(in srgb,var(--text) 10%,transparent); }
.studio-dashboard .studio-form input:not([type="checkbox"]):not([type="file"]),.studio-dashboard .studio-form select,.studio-dashboard .studio-form textarea { padding:.7rem .75rem; border:1px solid color-mix(in srgb,var(--text) 16%,transparent); background:var(--surface); color:var(--text); border-radius:0; }
.studio-dashboard .studio-form textarea { min-height:5.5rem; }
.studio-dashboard .studio-form input[type="file"] { width:100%; padding:.6rem 0; }
.studio-dashboard .studio-form label { color:var(--text-muted); font-size:.75rem; }
.studio-dashboard .studio-form button { margin-top:.2rem; }
.studio-dashboard .studio-subsection { margin-top:1.2rem; }
.studio-dashboard .studio-subsection summary { padding:.8rem 0; }
.studio-record-list { border-top:1px solid color-mix(in srgb,var(--text) 16%,transparent); }
.studio-record-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,.65fr); gap:2rem; padding:1.15rem 0; border-bottom:1px solid color-mix(in srgb,var(--text) 12%,transparent); }
.studio-record-copy h3 { margin:.35rem 0; font-size:1.1rem; letter-spacing:-.035em; overflow-wrap:anywhere; }
.studio-record-copy p { margin:.35rem 0 0; color:var(--text-muted); font-size:.78rem; line-height:1.6; overflow-wrap:anywhere; }
.studio-record-edit { min-width:0; }
.studio-record-edit[open] { padding-bottom:.5rem; }
.studio-record-edit .studio-form { grid-template-columns:1fr; }
.studio-content-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.5rem; }
.studio-content-card { display:flex; flex-direction:column; align-items:flex-start; min-width:0; min-height:230px; padding:1.2rem 0; border-top:2px solid var(--text); text-decoration:none; }
.studio-content-card h3 { margin:1.1rem 0 .4rem; font-size:1.4rem; letter-spacing:-.05em; }
.studio-content-card h3 span { display:inline-block; font-size:.85rem; }
.studio-content-card p { margin:0 0 1.1rem; color:var(--text-muted); font-size:.8rem; line-height:1.7; overflow-wrap:anywhere; }
.studio-content-actions { display:flex; flex-wrap:wrap; gap:.5rem 1rem; margin-top:auto; padding-top:1rem; }
.studio-content-actions a,.studio-content-cta { font-size:.76rem; font-weight:800; }
.studio-home-content-card { padding:1.2rem; color:var(--accent-text); background:var(--accent); border-top:0; }
.studio-home-content-card .studio-kicker,.studio-home-content-card p { color:color-mix(in srgb,var(--accent-text) 75%,transparent); }
.studio-home-content-card .studio-content-cta { margin-top:auto; }
.studio-library-callout { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; margin-top:1.5rem; padding:1.2rem 0; border-top:1px solid color-mix(in srgb,var(--text) 16%,transparent); border-bottom:1px solid color-mix(in srgb,var(--text) 16%,transparent); }
.studio-library-callout strong { display:block; margin:.4rem 0; font-size:1rem; }
.studio-library-callout p { margin:0; color:var(--text-muted); font-size:.78rem; }
.studio-library-callout > a { flex-shrink:0; font-size:.78rem; font-weight:800; }
.studio-empty-state { grid-column:1/-1; padding:2rem 0; border-top:1px solid color-mix(in srgb,var(--text) 16%,transparent); border-bottom:1px solid color-mix(in srgb,var(--text) 16%,transparent); }
.studio-empty-state > span { color:var(--text-muted); font-size:.68rem; font-weight:800; letter-spacing:.12em; }
.studio-empty-state h3 { margin:.7rem 0 .35rem; font-size:1.7rem; letter-spacing:-.05em; }
.studio-empty-state p,.studio-empty-line { color:var(--text-muted); font-size:.85rem; }
.studio-dashboard .btn-secondary { display:inline-flex; align-items:center; justify-content:center; padding:.72rem .9rem; border:1px solid color-mix(in srgb,var(--text) 20%,transparent); background:transparent; color:var(--text); font-size:.78rem; font-weight:800; text-decoration:none; }
.studio-dashboard .btn-primary { display:inline-flex; align-items:center; justify-content:center; padding:.78rem .95rem; font-size:.78rem; font-weight:800; }
@media(max-width:900px) {
  .studio-dashboard-hero { grid-template-columns:minmax(0,1fr) 150px; }
  .studio-hero-mark { min-height:170px; }
  .studio-project-grid { gap:2.3rem 1.2rem; }
  .studio-record-row { grid-template-columns:minmax(0,1fr) minmax(180px,.8fr); gap:1rem; }
  .studio-content-grid { gap:1rem; }
}
@media(max-width:650px) {
  .studio-dashboard-hero { grid-template-columns:1fr; padding-top:1.8rem; }
  .studio-hero-mark { display:none; }
  .studio-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .studio-overview-item { padding:.9rem .8rem .9rem 0; }
  .studio-overview-item:nth-child(3) { padding-left:0; border-left:0; border-top:1px solid color-mix(in srgb,var(--text) 13%,transparent); }
  .studio-overview-item:nth-child(4) { border-top:1px solid color-mix(in srgb,var(--text) 13%,transparent); }
  .studio-workspace-nav { top:4rem; gap:.8rem 1rem; }
  .studio-project-grid,.studio-content-grid { grid-template-columns:1fr; }
  .studio-project-visual,.studio-project-thumb { min-height:190px; }
  .studio-dashboard .studio-section-heading { align-items:flex-start; }
  .studio-dashboard .studio-section-heading > a { width:100%; }
  .studio-record-row { grid-template-columns:1fr; gap:.4rem; }
  .studio-create-project > .studio-form { padding-left:0; }
  .studio-library-callout { align-items:flex-start; flex-direction:column; gap:.8rem; }
  .studio-library-callout > a { padding:.5rem 0; }
}
@media(prefers-reduced-motion:reduce) {
  .studio-dashboard * { scroll-behavior:auto; }
}

/* Homepage visual refinement: stronger editorial hero and image-led project carousel */
.home-page { max-width:1240px; }
.home-intro { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr); align-items:end; column-gap:clamp(2rem,6vw,6rem); padding:clamp(3.5rem,9vw,7.5rem) 0 2.7rem; }
.home-intro > .studio-kicker { grid-column:1/-1; margin-bottom:1.1rem; }
.home-intro h1 { grid-column:1; grid-row:2; align-self:end; margin:0; font-size:clamp(3.6rem,9vw,8.2rem); line-height:.83; letter-spacing:-.105em; }
.home-intro-copy { grid-column:2; grid-row:2; align-self:end; max-width:510px; padding-bottom:.15rem; font-size:1rem; }
.home-intro-copy p:first-child { margin-top:0; }
.home-intro-copy p:last-child { margin-bottom:0; }
.home-intro > .content-page-image { grid-column:1/-1; }
.home-intro > .home-private-links { grid-column:1/-1; }
.home-carousel { margin-top:.2rem; }
.home-carousel-slides { min-height:clamp(430px,56vw,690px); }
.home-slide { padding:clamp(1.7rem,6vw,5.5rem); }
.home-slide-content { max-width:800px; }
.home-slide-kicker { display:inline-flex; align-items:center; gap:.65rem; }
.home-slide-kicker:before { content:""; width:1.8rem; height:1px; background:currentColor; }
.home-slide h2 { max-width:780px; font-size:clamp(3rem,7.8vw,7rem); }
.home-slide p { max-width:600px; font-size:clamp(1rem,1.8vw,1.16rem); }
.home-carousel-controls { min-height:4.5rem; }
.home-quick-links { margin:2rem 0 3.5rem; }
.home-quick-links a { padding:1.35rem 1rem 1.35rem 0; font-size:.92rem; }
.home-quick-links a span { transition:transform .18s ease; }
.home-quick-links a:hover span { transform:translate(3px,-3px); }
@media(max-width:760px) {
  .home-intro { grid-template-columns:1fr; row-gap:1.5rem; padding:3rem 0 2rem; }
  .home-intro > .studio-kicker { grid-column:1; }
  .home-intro h1 { grid-column:1; grid-row:auto; font-size:clamp(3.4rem,14vw,6rem); }
  .home-intro-copy { grid-column:1; grid-row:auto; max-width:100%; padding:0; }
  .home-intro > .content-page-image,.home-intro > .home-private-links { grid-column:1; }
  .home-carousel-slides { min-height:500px; }
}
@media(max-width:420px) {
  .home-carousel-slides { min-height:520px; }
  .home-carousel-count { font-size:.67rem; }
  .home-carousel-dots { gap:.3rem; }
  .home-carousel-dots button { width:1rem; }
}


/* Homepage refinement: editorial hierarchy, restrained links and a stable cross-fade carousel. */
.home-intro {
  position: relative;
  align-items: end;
  row-gap: 1.2rem;
  padding-top: clamp(3.5rem, 8vw, 7rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}
.home-intro > .studio-kicker {
  color: var(--text-muted);
  font-size: .68rem;
  letter-spacing: .16em;
}
.home-intro h1 {
  max-width: 10ch;
  font-weight: 760;
  line-height: .9;
  letter-spacing: -.09em;
  text-wrap: balance;
}
.home-intro h1 span { color: #2563eb; }
.home-intro-copy {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.85;
}
.home-intro-copy p { margin: 0 0 .9rem; }
.home-intro-copy a,
.content-page-body a,
.home-private-links a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  text-decoration-color: currentColor;
  font-weight: 600;
}
.home-intro-copy a:hover,
.content-page-body a:hover,
.home-private-links a:hover {
  color: #1d4ed8;
  text-decoration-thickness: 2px;
}
.home-private-links { display:flex; flex-wrap:wrap; gap:.8rem 1.5rem; }
.home-carousel {
  margin-top: .35rem;
  border: 0;
  background: #101114;
  box-shadow: 0 20px 55px rgba(0,0,0,.10);
}
.home-carousel-slides {
  position: relative;
  min-height: clamp(420px, 51vw, 650px);
  overflow: hidden;
  background: #101114;
}
.home-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  min-height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 850ms cubic-bezier(.22,.61,.36,1),
    transform 1100ms cubic-bezier(.22,.61,.36,1),
    visibility 850ms;
  background: #17191e;
  will-change: opacity, transform;
}
.home-slide.is-active {
  position: absolute;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0,0,0);
  z-index: 1;
}
.home-slide-backdrop {
  z-index: 0;
  background-image: var(--slide-image, linear-gradient(125deg,#292d35,#111318 70%,#222630));
  background-size: cover;
  background-position: center;
  transform: scale(1.025);
  transition: transform 6s cubic-bezier(.2,.6,.3,1);
}
.home-slide.is-active .home-slide-backdrop { transform: scale(1); }
.home-slide-backdrop:after {
  background:
    linear-gradient(90deg,rgba(7,9,13,.82) 0%,rgba(7,9,13,.48) 58%,rgba(7,9,13,.08) 100%),
    linear-gradient(0deg,rgba(7,9,13,.48),transparent 65%);
}
.home-slide-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  padding: clamp(1.7rem, 6vw, 5rem);
}
.home-slide-kicker {
  margin-bottom: 1.2rem;
  font-size: .68rem;
  letter-spacing: .17em;
}
.home-slide h2 {
  max-width: 10ch;
  margin-bottom: 1rem;
  font-weight: 760;
  line-height: .94;
  letter-spacing: -.075em;
  text-wrap: balance;
}
.home-slide p {
  max-width: 570px;
  margin-bottom: 1.6rem;
  color: rgba(255,255,255,.82);
  line-height: 1.75;
}
.home-slide a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 2.8rem;
  padding: .25rem 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.82);
  color: #fff;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}
.home-slide a:hover {
  border-bottom-color: #93b4ff;
  color: #c7d8ff;
  text-decoration: none;
}
.home-carousel-controls {
  position: relative;
  z-index: 2;
  min-height: 4.6rem;
  background: #101114;
  border-top: 1px solid rgba(255,255,255,.12);
}
.home-carousel-dots button {
  width: 1.8rem;
  height: 3px;
  border-radius: 0;
  transition: background-color .2s ease, width .2s ease;
}
.home-carousel-dots button[aria-current="true"] { width: 2.4rem; }
.home-carousel-arrows button {
  border-radius: 0;
  transition: background .2s ease, border-color .2s ease;
}
.home-carousel-arrows button:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.65);
}
.home-quick-links {
  margin-top: 2.2rem;
  border-top-color: color-mix(in srgb,var(--text) 20%,transparent);
  border-bottom-color: color-mix(in srgb,var(--text) 20%,transparent);
}
.home-quick-links a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: currentColor;
  transition: color .18s ease;
}
.home-quick-links a:hover { color: #1d4ed8; text-decoration-thickness: 2px; }
.home-quick-links a+a { border-left-color: color-mix(in srgb,var(--text) 20%,transparent); }
.home-quick-links a span { display:none; }

/* Slideshow editor in the Studio */
.homepage-slide-editor {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid color-mix(in srgb,var(--text) 18%,transparent);
}
.homepage-slide-editor h2 {
  margin: 0 0 .45rem;
  font-size: 1.2rem;
  letter-spacing: -.035em;
}
.homepage-slide-list {
  display: grid;
  margin-top: 1rem;
  border-top: 1px solid color-mix(in srgb,var(--text) 14%,transparent);
}
.homepage-slide-option {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .9rem;
  padding: .85rem 0;
  border-bottom: 1px solid color-mix(in srgb,var(--text) 14%,transparent);
  cursor: pointer;
}
.homepage-slide-option > input[type="checkbox"] { width: 1rem; height: 1rem; margin: 0; accent-color: #2563eb; }
.homepage-slide-option-copy { display:flex; min-width:0; flex-direction:column; gap:.2rem; }
.homepage-slide-option-copy strong { font-size:.9rem; overflow-wrap:anywhere; }
.homepage-slide-option-copy small { color:var(--text-muted); font-size:.76rem; line-height:1.45; }
.homepage-slide-order-label { display:flex; align-items:center; gap:.45rem; color:var(--text-muted); font-size:.72rem; white-space:nowrap; }
.studio-dashboard .homepage-slide-order-label input {
  width:3.5rem !important;
  min-width:0 !important;
  margin:0 !important;
  padding:.45rem !important;
  text-align:center;
}
@media (max-width: 680px) {
  .home-intro { padding:3rem 0 2rem; row-gap:1.25rem; }
  .home-intro h1 { max-width:100%; font-size:clamp(3.5rem,14vw,6rem); }
  .home-carousel-slides { min-height:500px; }
  .home-slide { padding:0; }
  .home-slide-content { padding:1.5rem; }
  .home-slide h2 { font-size:clamp(2.7rem,12vw,4.3rem); }
  .home-carousel-controls { gap:.65rem; padding:.85rem; }
  .home-carousel-count { font-size:.68rem; }
  .home-carousel-dots { gap:.25rem; }
  .home-carousel-dots button { width:1rem; }
  .home-carousel-dots button[aria-current="true"] { width:1.6rem; }
  .homepage-slide-option { grid-template-columns:auto minmax(0,1fr); gap:.7rem; }
  .homepage-slide-order-label { grid-column:2; justify-self:start; }
}
@media (prefers-reduced-motion: reduce) {
  .home-slide,
  .home-slide-backdrop,
  .home-carousel-dots button,
  .home-carousel-arrows button { transition:none !important; transform:none !important; }
}

.home-private-links a,
.content-private-link a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
.home-private-links a:hover,
.content-private-link a:hover {
  color: #1d4ed8;
  text-decoration-thickness: 2px;
}


/* Individual project, version, Code and Design detail pages */
.version-detail-page,
.library-detail-page {
  width: min(100% - 2rem, 980px);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 4rem;
}
.detail-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  margin: 0 0 2rem;
  color: var(--muted, #667085);
  font-size: .9rem;
}
.detail-breadcrumbs a,
.detail-back-link a,
.version-detail-project a,
.version-detail-link,
.library-item-title-link,
.library-item-details a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}
.detail-breadcrumbs a:hover,
.detail-back-link a:hover,
.version-detail-project a:hover,
.version-detail-link:hover,
.library-item-title-link:hover,
.library-item-details a:hover {
  color: #1d4ed8;
  text-decoration-thickness: 2px;
}
.version-detail-header,
.library-detail-header {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.version-detail-header h1,
.library-detail-header h1 {
  margin: .45rem 0 1rem;
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.version-detail-project,
.library-detail-header .library-summary {
  max-width: 68ch;
  font-size: 1.08rem;
}
.version-detail-notes,
.version-detail-downloads {
  margin-top: 1.25rem;
}
.library-detail-content {
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.library-detail-content .library-code {
  max-width: 100%;
  overflow-x: auto;
}
.library-detail-content .library-asset-link {
  margin: 1.5rem 0;
}
.library-item-details {
  margin-top: 1rem;
  font-size: .92rem;
}
.library-item-title-link {
  text-decoration: none;
}
.library-item-title-link:hover {
  text-decoration: underline;
}
.detail-back-link {
  margin-top: 2rem;
}
.library-empty-note {
  color: var(--muted, #667085);
}
@media (max-width: 600px) {
  .version-detail-page,
  .library-detail-page {
    width: min(100% - 1.25rem, 980px);
  }
  .detail-breadcrumbs {
    margin-bottom: 1.25rem;
  }
}


/* Homepage slide preview follows the active site theme. */
:root {
  --home-carousel-bg: #f5f7fa;
  --home-carousel-text: #111827;
  --home-slide-bg: #e9edf3;
  --home-slide-copy: #374151;
  --home-slide-link: #1d4ed8;
  --home-slide-overlay: linear-gradient(90deg, rgba(248,250,252,.94) 0%, rgba(248,250,252,.78) 58%, rgba(248,250,252,.22) 100%), linear-gradient(0deg, rgba(248,250,252,.5), transparent 65%);
  --home-carousel-divider: rgba(17,24,39,.14);
  --home-carousel-control: rgba(17,24,39,.32);
  --home-carousel-control-active: #111827;
  --home-carousel-control-hover: rgba(17,24,39,.07);
}

:root[data-theme="dark"] {
  --home-carousel-bg: #101114;
  --home-carousel-text: #f9fafb;
  --home-slide-bg: #17191e;
  --home-slide-copy: rgba(255,255,255,.82);
  --home-slide-link: #ffffff;
  --home-slide-overlay: linear-gradient(90deg, rgba(7,9,13,.82) 0%, rgba(7,9,13,.48) 58%, rgba(7,9,13,.08) 100%), linear-gradient(0deg, rgba(7,9,13,.48), transparent 65%);
  --home-carousel-divider: rgba(255,255,255,.12);
  --home-carousel-control: rgba(255,255,255,.3);
  --home-carousel-control-active: #ffffff;
  --home-carousel-control-hover: rgba(255,255,255,.1);
}

.home-carousel {
  background: var(--home-carousel-bg);
  color: var(--home-carousel-text);
  box-shadow: 0 20px 55px rgba(0,0,0,.08);
}

:root[data-theme="dark"] .home-carousel {
  box-shadow: 0 20px 55px rgba(0,0,0,.18);
}

.home-carousel-slides,
.home-slide {
  background-color: var(--home-slide-bg);
  color: var(--home-carousel-text);
}

.home-slide-backdrop:after {
  background: var(--home-slide-overlay);
}

.home-slide p {
  color: var(--home-slide-copy);
}

.home-slide a {
  border-bottom-color: color-mix(in srgb, var(--home-slide-link) 72%, transparent);
  color: var(--home-slide-link);
}

.home-slide a:hover {
  border-bottom-color: var(--home-slide-link);
  color: var(--home-slide-link);
  text-decoration: underline;
  text-underline-offset: .22em;
}

.home-carousel-controls {
  background: var(--home-carousel-bg);
  border-top: 1px solid var(--home-carousel-divider);
}

.home-carousel-count {
  color: var(--text-muted);
}

.home-carousel-count strong {
  color: var(--home-carousel-text);
}

.home-carousel-dots button {
  background: var(--home-carousel-control);
}

.home-carousel-dots button[aria-current="true"] {
  background: var(--home-carousel-control-active);
}

.home-carousel-arrows button {
  border-color: var(--home-carousel-divider);
  color: var(--home-carousel-text);
}

.home-carousel-arrows button:hover {
  background: var(--home-carousel-control-hover);
  border-color: var(--home-carousel-text);
}


/* Layout compatibility for the current server-rendered application. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4.5rem;
  padding: .65rem max(1rem, calc((100vw - 1120px) / 2));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  backdrop-filter: blur(14px);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 850;
  letter-spacing: -.045em;
}
.site-brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--accent);
  color: var(--accent-text);
  font-size: .78rem;
  letter-spacing: -.04em;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .2rem;
  flex-wrap: wrap;
}
.site-nav > a {
  padding: .55rem .72rem;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 700;
  border-bottom: 2px solid transparent;
}
.site-nav > a:hover,
.site-nav > a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}
.site-nav .nav-logout { display: inline-flex; margin: 0 0 0 .3rem; }
.site-nav .nav-logout button {
  padding: .5rem .65rem;
  font-size: .85rem;
}
.site-main {
  width: min(1120px, calc(100% - 2rem));
  min-height: calc(100vh - 9rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.25rem) 0 4rem;
}
.site-main > .projects-hero,
.site-main > .page-section,
.site-main > .studio-upload-only {
  width: 100%;
}
.site-main > .projects-hero { margin: 0 auto 2.75rem; }
.site-main > .page-section { margin: 0 auto 2.5rem; }
.site-main .page-card,
.site-main .studio-upload-card {
  padding: clamp(1.1rem, 2.5vw, 1.8rem);
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: var(--surface);
}
.site-main .content-page { max-width: 850px; margin: 0 auto; }
.site-main .content-page h1 { margin-bottom: 1.25rem; }
.site-main .content-page-body { max-width: 72ch; line-height: 1.85; overflow-wrap: anywhere; }
.site-main .btn-primary,
.site-main a.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.8rem;
  padding: .75rem 1rem;
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid var(--accent);
  font-weight: 750;
}
.site-main .btn-primary:hover { opacity: .86; }
.site-main .section-heading { margin-bottom: 1.2rem; }
.site-main .section-heading .eyebrow,
.site-main .eyebrow,
.site-main .page-hero .eyebrow {
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.site-main .section-heading h2 { margin-top: .45rem; }
.site-main .studio-upload-only { max-width: 1000px; margin: 0 auto; }
.site-main .studio-upload-only > .page-hero {
  padding: 0 0 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
}
.site-main .studio-upload-only > .page-hero h1 {
  margin: .55rem 0 .75rem;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -.07em;
}
.site-main .studio-upload-card { margin: 1rem 0; }
.site-main .studio-upload-card h2 { margin-bottom: .5rem; }
.site-main .studio-upload-card form { margin: 1.2rem 0; }
.site-main .studio-upload-card input[type="file"] { display: block; margin-top: .5rem; }
.site-main .studio-upload-card progress { display: block; margin: .75rem 0; }
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem max(1rem, calc((100vw - 1120px) / 2)) 1.75rem;
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  color: var(--text-muted);
  font-size: .78rem;
}
.site-footer span:first-child { font-weight: 850; letter-spacing: .1em; }
.site-main .notice { padding: .8rem 1rem; background: var(--surface-strong); border-left-width: 3px; }
.site-main input:not([type="checkbox"]):not([type="radio"]),
.site-main select,
.site-main textarea {
  width: 100%;
  min-height: 2.8rem;
  padding: .7rem .8rem;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  background: var(--bg);
  color: var(--text);
}
.site-main input[type="file"] { min-height: auto; }
.site-main input:focus-visible,
.site-main select:focus-visible,
.site-main textarea:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: .6rem; padding: .8rem 1rem; }
  .site-nav { justify-content: flex-start; width: 100%; }
  .site-nav > a { padding: .45rem .55rem; font-size: .82rem; }
  .site-main { width: min(100% - 1.25rem, 1120px); padding-top: 1.5rem; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: .35rem; }
}

/* Refined CodeDraft Studios visual system */
:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-strong: #f0f1f3;
  --text: #17181b;
  --text-muted: #686b73;
  --border: #e4e5e8;
  --accent: #24262b;
  --accent-soft: #eceef1;
  --accent-text: #ffffff;
  --shadow: 0 12px 40px rgba(20, 22, 28, .055);
}
:root[data-theme="dark"] {
  --bg: #101113;
  --surface: #191a1e;
  --surface-strong: #222329;
  --text: #f5f5f7;
  --text-muted: #a3a5ad;
  --border: #303137;
  --accent: #f5f5f7;
  --accent-soft: #292a30;
  --accent-text: #17181b;
  --shadow: 0 16px 48px rgba(0, 0, 0, .22);
}
* { border-radius: initial !important; }
body {
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -.018em;
  -webkit-font-smoothing: antialiased;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  min-height: 70px;
  padding: .75rem max(1.5rem, calc((100vw - 1180px) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--text);
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.site-brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px !important;
  background: var(--text);
  color: var(--bg);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: -.06em;
}
.site-nav { display:flex; align-items:center; justify-content:flex-end; gap:.3rem; flex-wrap:wrap; }
.site-nav > a, .site-nav .nav-logout button {
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:.45rem .75rem;
  color:var(--text-muted);
  background:transparent;
  border:1px solid transparent;
  border-radius:999px !important;
  font:inherit;
  font-size:.88rem;
  font-weight:550;
  transition:background .18s ease,color .18s ease,border-color .18s ease;
}
.site-nav > a:hover, .site-nav > a[aria-current="page"], .site-nav .nav-logout button:hover {
  color:var(--text);
  background:var(--surface-strong);
}
.site-nav .nav-logout { margin:0; }
.site-nav .nav-logout button { cursor:pointer; }
.theme-toggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  min-height:38px;
  padding:.4rem .75rem;
  border:1px solid var(--border);
  border-radius:999px !important;
  color:var(--text);
  background:var(--surface);
  font:inherit;
  font-size:.84rem;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.theme-toggle:hover { background:var(--surface-strong); border-color:var(--text-muted); }
.theme-toggle:active { transform:scale(.97); }
.theme-toggle-icon { font-size:1rem; line-height:1; }
.site-main {
  width:min(1180px, calc(100% - 3rem));
  min-height:calc(100vh - 145px);
  margin:0 auto;
  padding:clamp(2rem,5vw,4.5rem) 0 5rem;
}
.site-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  width:min(1180px, calc(100% - 3rem));
  margin:0 auto;
  padding:1.5rem 0 2rem;
  border-top:1px solid var(--border);
  color:var(--text-muted);
  font-size:.78rem;
  letter-spacing:.01em;
}
.projects-hero {
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(220px,.55fr);
  align-items:center;
  gap:clamp(2rem,6vw,6rem);
  min-height:clamp(390px,48vw,580px);
  padding:clamp(2rem,6vw,5.5rem);
  overflow:hidden;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:28px !important;
  box-shadow:var(--shadow);
}
.projects-hero-copy { max-width:720px; }
.projects-eyebrow, .eyebrow {
  display:inline-block;
  color:var(--text-muted);
  font-size:.72rem;
  font-weight:650;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.projects-hero h1 {
  margin:1.15rem 0 1.25rem;
  color:var(--text);
  font-size:clamp(3rem,7vw,6.3rem);
  font-weight:650;
  line-height:.99;
  letter-spacing:-.075em;
}
.projects-hero h1 span { color:var(--text-muted); }
.projects-hero p {
  max-width:520px;
  margin:0 0 1.8rem;
  color:var(--text-muted);
  font-size:clamp(1rem,1.4vw,1.15rem);
  line-height:1.8;
}
.projects-hero-index {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.55rem;
  padding:2rem;
  background:var(--surface-strong);
  border:1px solid var(--border);
  border-radius:22px !important;
}
.projects-hero-index > span { color:var(--text-muted); font-size:.8rem; font-weight:700; letter-spacing:.16em; }
.projects-hero-index strong { font-size:clamp(3rem,5vw,5rem); line-height:1; letter-spacing:-.07em; font-weight:650; }
.projects-hero-index small { color:var(--text-muted); font-size:.7rem; letter-spacing:.1em; }
.projects-index-rule { width:100%; height:1px; margin:.7rem 0; background:var(--border); }
.page-section { padding-top:clamp(3rem,7vw,6rem); }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; }
.section-heading h2 { margin:.45rem 0 0; font-size:clamp(1.7rem,3vw,2.5rem); line-height:1.1; letter-spacing:-.055em; font-weight:620; }
.projects-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.projects-card {
  min-height:230px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:20px !important;
  box-shadow:none;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.projects-card:hover { transform:translateY(-3px); border-color:color-mix(in srgb,var(--text-muted) 50%,var(--border)); box-shadow:var(--shadow); }
.projects-card-content { display:flex; flex-direction:column; height:100%; padding:1.5rem; }
.projects-card-meta { display:flex; justify-content:space-between; gap:.5rem; color:var(--text-muted); font-size:.68rem; letter-spacing:.1em; }
.projects-card h2 { margin:2rem 0 .65rem; font-size:1.35rem; line-height:1.2; letter-spacing:-.045em; font-weight:620; }
.projects-card-description { color:var(--text-muted); font-size:.9rem; line-height:1.7; }
.projects-card-footer { display:flex; justify-content:space-between; align-items:center; gap:.7rem; margin-top:auto; padding-top:1.5rem; color:var(--text-muted); font-size:.75rem; }
.projects-card-link { color:var(--text); font-weight:600; }
.btn-primary, button[type="submit"] {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  min-height:44px;
  padding:.7rem 1.15rem;
  border:1px solid var(--accent);
  border-radius:999px !important;
  background:var(--accent);
  color:var(--accent-text);
  font:inherit;
  font-size:.9rem;
  font-weight:600;
  cursor:pointer;
  transition:transform .18s ease,opacity .18s ease,background .18s ease;
}
.btn-primary:hover, button[type="submit"]:hover { opacity:.88; transform:translateY(-1px); }
.page-card, .content-page {
  padding:clamp(1.5rem,4vw,3rem);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:24px !important;
  box-shadow:var(--shadow);
}
.page-card h1, .content-page h1 { margin-top:0; font-size:clamp(2rem,4vw,3.5rem); line-height:1.1; letter-spacing:-.06em; }
input, textarea, select {
  max-width:100%;
  border:1px solid var(--border);
  border-radius:12px !important;
  background:var(--bg);
  color:var(--text);
}
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline:3px solid color-mix(in srgb,var(--text-muted) 45%,transparent);
  outline-offset:3px;
}
.notice { padding:1rem 1.15rem; margin-bottom:1.25rem; border:1px solid var(--border); border-radius:14px !important; background:var(--surface); }
@media (max-width: 820px) {
  .site-header { align-items:flex-start; flex-wrap:wrap; padding:.8rem 1rem; gap:.75rem; }
  .site-nav { justify-content:flex-start; width:100%; gap:.2rem; }
  .site-nav > a, .site-nav .nav-logout button, .theme-toggle { min-height:36px; padding:.35rem .65rem; font-size:.8rem; }
  .site-main { width:calc(100% - 2rem); padding-top:1.25rem; }
  .projects-hero { grid-template-columns:1fr; min-height:0; gap:2rem; padding:clamp(1.5rem,6vw,3rem); border-radius:22px !important; }
  .projects-hero-index { padding:1.3rem; }
  .projects-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .site-footer { width:calc(100% - 2rem); }
}
@media (max-width: 560px) {
  .site-brand { font-size:.9rem; }
  .projects-hero h1 { font-size:clamp(2.8rem,14vw,4.3rem); }
  .projects-grid { grid-template-columns:1fr; }
  .section-heading { align-items:flex-start; flex-direction:column; }
  .site-footer { align-items:flex-start; flex-direction:column; gap:.25rem; }
  .theme-toggle-label { display:inline; }
}


/* Refined editorial system: restrained surfaces, deliberate spacing and motion. */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-strong: #e9e9ed;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --border: #d2d2d7;
  --accent: #0071e3;
  --accent-soft: #e8f2ff;
  --accent-text: #ffffff;
  --shadow: 0 18px 50px rgb(0 0 0 / 5%);
  scroll-behavior: smooth;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #161617;
  --surface-strong: #242426;
  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --border: #38383a;
  --accent: #2997ff;
  --accent-soft: #10243a;
  --accent-text: #ffffff;
  --shadow: 0 18px 50px rgb(0 0 0 / 22%);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  padding: .65rem max(1.5rem, calc((100vw - 1180px) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom-color: color-mix(in srgb, var(--border) 58%, transparent);
}
.site-brand { gap: .55rem; font-size: .96rem; font-weight: 650; letter-spacing: -.035em; }
.site-brand-mark {
  width: 29px;
  height: 29px;
  border-radius: 8px !important;
  background: var(--text);
  color: var(--bg);
  font-size: .68rem;
}
.site-nav { gap: .15rem; }
.site-nav > a, .site-nav .nav-logout button {
  min-height: 34px;
  padding: .4rem .68rem;
  font-size: .82rem;
  font-weight: 500;
}
.site-nav > a[aria-current="page"] { background: var(--surface-strong); }
.theme-toggle {
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  font-size: .82rem;
}
.theme-toggle:hover { border-color: transparent; background: var(--surface-strong); }
.site-main { padding-top: clamp(2rem, 5vw, 4.75rem); }
.projects-hero {
  min-height: clamp(400px, 50vw, 620px);
  padding: clamp(2rem, 7vw, 6.5rem);
  background: var(--surface);
  border-color: transparent;
  border-radius: 30px !important;
  box-shadow: none;
}
.projects-eyebrow, .eyebrow { font-size: .68rem; font-weight: 600; letter-spacing: .11em; }
.projects-hero h1 {
  margin: 1.4rem 0 1.5rem;
  font-size: clamp(3.2rem, 7.5vw, 7rem);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.078em;
}
.projects-hero h1 span { color: var(--text-muted); }
.projects-hero p { line-height: 1.65; letter-spacing: -.015em; }
.projects-hero-index {
  padding: 1.65rem;
  background: var(--bg);
  border: 0;
  border-radius: 20px !important;
}
.projects-hero-index strong { font-weight: 600; }
.page-section { padding-top: clamp(3.5rem, 8vw, 7rem); }
.section-heading { margin-bottom: 1.8rem; }
.section-heading h2 { font-weight: 600; letter-spacing: -.055em; }
.projects-grid { gap: 1.1rem; }
.projects-card {
  background: var(--surface);
  border-color: transparent;
  border-radius: 20px !important;
  transition: transform .55s cubic-bezier(.2,.75,.25,1), background .25s ease, box-shadow .35s ease;
}
.projects-card:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgb(0 0 0 / 7%); }
.projects-card-content { padding: 1.6rem; }
.projects-card h2 { font-weight: 600; letter-spacing: -.04em; }
.btn-primary, button[type="submit"] {
  min-height: 42px;
  border-color: var(--accent);
  border-radius: 999px !important;
  font-size: .88rem;
  font-weight: 550;
  transition: transform .25s cubic-bezier(.2,.75,.25,1), background .2s ease, box-shadow .25s ease;
}
.btn-primary:hover, button[type="submit"]:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 22%, transparent);
}
.page-card, .content-page { border-color: transparent; border-radius: 22px !important; }
.site-footer { font-size: .76rem; }
.menu-toggle, .drawer-wrap { display: none; }
.menu-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50% !important;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 19px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease;
}
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
@media (max-width: 820px) {
  .site-header {
    align-items: center;
    flex-wrap: nowrap;
    min-height: 62px;
    padding: .55rem 1rem;
    gap: .75rem;
  }
  .menu-toggle { display: inline-flex; margin-left: auto; flex: 0 0 auto; }
  .site-nav { display: none; }
  .drawer-wrap {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    visibility: hidden;
    pointer-events: none;
  }
  .drawer-wrap.is-open { visibility: visible; pointer-events: auto; }
  .drawer-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0 !important;
    background: rgb(0 0 0 / 0%);
    opacity: 0;
    transition: opacity .32s ease, background .32s ease;
  }
  .drawer-wrap.is-open .drawer-scrim { background: rgb(0 0 0 / 42%); opacity: 1; }
  .mobile-drawer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    display: flex;
    flex-direction: column;
    width: min(88vw, 390px);
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.25rem calc(env(safe-area-inset-bottom, 0px) + 1.25rem);
    background: var(--bg);
    color: var(--text);
    box-shadow: 20px 0 60px rgb(0 0 0 / 12%);
    transform: translateX(-102%);
    transition: transform .32s cubic-bezier(.2,.8,.2,1);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
  }
  .drawer-wrap.is-open .mobile-drawer { transform: translateX(0); }
  .drawer-header { display: flex; align-items: center; justify-content: flex-end; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
  .menu-close { width: 38px; height: 38px; border: 0; border-radius: 50% !important; background: var(--surface-strong); color: var(--text); font-size: 1.5rem; cursor: pointer; }
  .drawer-links { display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem 0; }
  .drawer-links > a {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: .65rem .75rem;
    border-radius: 12px !important;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 550;
    letter-spacing: -.025em;
    transition: background .2s ease, transform .2s ease;
  }
  .drawer-links > a:hover, .drawer-links > a[aria-current="page"] { background: var(--surface-strong); }
  .drawer-controls { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--border); }
  .drawer-controls .nav-logout button { min-height: 38px; padding: .5rem .8rem; border: 0; border-radius: 999px !important; background: var(--surface-strong); color: var(--text); cursor: pointer; }
  .projects-hero { grid-template-columns: 1fr; min-height: 0; gap: 2rem; padding: clamp(2rem, 7vw, 4rem); }
  .projects-hero-index { max-width: 100%; }
  .site-main { padding-top: 1.5rem; }
}
@media (max-width: 560px) {
  .site-brand { font-size: .9rem; }
  .projects-hero { border-radius: 22px !important; }
  .projects-hero h1 { font-size: clamp(2.8rem, 13vw, 4.4rem); }
  .projects-grid { grid-template-columns: 1fr; }
}
@keyframes calm-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.motion-ready .projects-hero-copy,
.motion-ready .projects-hero-index,
.motion-ready .section-heading,
.motion-ready .projects-card,
.motion-ready .page-hero {
  animation: calm-rise .75s cubic-bezier(.2,.75,.25,1) both;
}
.motion-ready .projects-hero-index { animation-delay: .08s; }
.motion-ready .projects-card:nth-child(2) { animation-delay: .07s; }
.motion-ready .projects-card:nth-child(3) { animation-delay: .14s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
