/* Feature Joinery Gallery: the admin UI in the website's branding (nav_bar.html, footer.html, tailwind.config.js,
   css/styles.css). Canvas #131313, the nav surface #1B1C1C, fields #1F2020; one accent #1CAEE5; Plus Jakarta Sans for
   headings and caps labels, Inter for body; 3px corners; white focus rings; 44px targets; hovers only under
   (hover: hover); everything eased. An internal tool: it says almost nothing. Five sizes: 36 / 20 / 16 / 13 / 12. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---- tokens (tailwind.config.js) */
:root {
  --bg: #131313; --nav: #1B1C1C; --s1: #1F2020; --s2: #2A2A2A; --s3: #353535;
  --text: #FFFFFF; --text-2: #E4E2E1; --text-3: #BDC8D0;
  --w70: rgba(255, 255, 255, .7); --w50: rgba(255, 255, 255, .5); --w25: rgba(255, 255, 255, .25); --w10: rgba(255, 255, 255, .1);
  --accent: #1CAEE5; --outline: #87929A; --edge: rgba(135, 146, 154, .3);
  --line: rgba(62, 72, 79, .2);            /* the site's border-outline-variant/20: section rules */
  --line-2: rgba(255, 255, 255, .08);      /* rows */
  --error: #FFB4AB; --error-bg: #93000A; --on-error: #FFDAD6;
  --plate: rgba(19, 19, 19, .78);
  --font-h: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-b: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;   /* only the authenticator key and the site folder */
  --fs-1: clamp(28px, 3vw, 36px);   /* page titles */
  --fs-2: 20px;                      /* section and dialog titles */
  --fs-3: 16px;                      /* body, inputs, row titles */
  --fs-4: 13px;                      /* secondary text, hints */
  --fs-5: 12px;                      /* caps labels: buttons, links, status */
  --ease: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.65, 0, .35, 1); --t: .3s;
  --r: 3px; --w: 1440px; --gut: 48px; --hdr: 64px;
}
@media (max-width: 1023px) { :root { --gut: 32px; } }
@media (max-width: 767px) { :root { --gut: 20px; } }

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 400 var(--fs-3)/1.5 var(--font-b); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
#app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }   /* white rings */
::selection { background: var(--accent); color: #fff; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10000; padding: 12px 16px; background: var(--accent); color: #fff; border-radius: var(--r); font: 700 var(--fs-5)/1 var(--font-h); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.skip:focus { left: 8px; }
.noscript { padding: 40px 20px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--w50); }
.small { font-size: var(--fs-4); }
.mono { font-family: var(--font-mono); font-size: var(--fs-4); overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.arr { display: inline-block; transition: transform .35s var(--ease); }

/* ---- header, as the site's nav: the logo at 32px, the tabs, Account and Sign out */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--nav); box-shadow: 0 1px 0 var(--line); }
.hdr__in { max-width: var(--w); min-height: var(--hdr); margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: stretch; gap: 32px; }
.brand { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; }
.brand__logo { height: 32px; width: auto; object-fit: contain; }
.brand__s { padding-left: 14px; border-left: 1px solid var(--w25); font: 600 var(--fs-5)/16px var(--font-h); letter-spacing: .1em; text-transform: uppercase; color: var(--w50); white-space: nowrap; }
.nav { flex: none; display: flex; gap: 32px; }
.nav a, .me__link, .me__out { display: flex; align-items: center; margin: 0; padding: 0; border: 0; background: none; font: 600 13px/1 var(--font-h); letter-spacing: .02em; text-transform: uppercase; color: var(--w70); text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: color var(--t) ease, box-shadow var(--t) ease; }
.nav a[aria-current="page"], .me__link[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.me { flex: 1; display: flex; justify-content: flex-end; align-items: stretch; gap: 24px; }
.me__out { color: var(--w50); }
@media (hover: hover) { .nav a:hover, .me__link:hover, .me__out:hover { color: var(--text); } }
@media (max-width: 767px) {
  .hdr { position: static; }
  .hdr__in { flex-wrap: wrap; gap: 0 20px; min-height: 0; }
  .brand, .me { min-height: 60px; }
  .brand__logo { height: 28px; }
  .me { gap: 16px; }
  .nav { order: 3; flex-basis: 100%; gap: 24px; min-height: 48px; border-top: 1px solid var(--line); }
}

/* ---- page */
.main { flex: 1 0 auto; width: 100%; max-width: var(--w); margin: 0 auto; padding: 48px var(--gut) 120px; animation: rise .6s var(--ease); }
.main-bare { flex: 1 0 auto; display: flex; flex-direction: column; animation: rise .6s var(--ease); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin: 0 0 40px; }
.page-head > div:first-child { min-width: 0; max-width: 720px; }
h1 { margin: 0; font: 700 var(--fs-1)/1.1 var(--font-h); letter-spacing: -.025em; color: var(--text); overflow-wrap: anywhere; text-wrap: balance; }
h2 { margin: 0 0 20px; font: 700 var(--fs-2)/1.2 var(--font-h); letter-spacing: -.01em; color: var(--text); }
.h2__n { margin-left: 8px; font: 500 var(--fs-4)/1 var(--font-b); letter-spacing: 0; color: var(--w50); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lede { margin: 12px 0 0; max-width: 60ch; color: var(--text-3); line-height: 1.6; text-wrap: pretty; }
.lede b { color: var(--text); font-weight: 600; }
.lede--tight { margin: -8px 0 24px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.section { margin: 40px 0 0; padding: 40px 0 0; border-top: 1px solid var(--line); }
.section--first { margin-top: 0; padding-top: 0; border-top: 0; }
.count { margin: 0 0 12px; font-size: var(--fs-4); color: var(--w50); font-variant-numeric: tabular-nums; }
.note { margin: 0; padding: 16px 20px; border: 1px dashed var(--edge); border-radius: var(--r); color: var(--text-3); font-size: var(--fs-4); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
.cols { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 0 96px; align-items: start; }
@media (max-width: 1100px) { .cols { gap: 0 56px; } }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); } .cols > * + * { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.split__main { min-width: 0; }
@media (max-width: 767px) { .main { padding-bottom: 88px; } .page-head { margin-bottom: 32px; } }

/* ---- buttons: the site's primary (#1CAEE5 fill -> white fill with #1CAEE5 text, 300ms) and its ghost
   (white/10 fill, white/25 edge). Plus Jakarta Sans 12px bold caps, tracking-widest, 3px corners, 44px tall. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border: 1px solid var(--w25); border-radius: var(--r); background: var(--w10); color: var(--text); font: 700 var(--fs-5)/1 var(--font-h); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--t) ease, color var(--t) ease, border-color var(--t) ease, transform .15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--danger { background: none; border-color: rgba(255, 180, 171, .35); color: var(--error); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 11px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"], .btn.is-disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
@media (hover: hover) {
  .btn:hover { background: rgba(255, 255, 255, .16); border-color: var(--w50); }
  .btn--primary:hover { background: #fff; border-color: #fff; color: var(--accent); }
  .btn--danger:hover { background: rgba(255, 180, 171, .08); border-color: var(--error); }
  .btn:hover .arr { transform: translate(2px, -2px); }
}
/* the text link: caps, a hairline underline that turns the accent; a 44px target */
.link { display: inline-block; margin: 0; padding: 13px 0; border: 0; background: none; font: 600 var(--fs-5)/18px var(--font-h); letter-spacing: .1em; text-transform: uppercase; color: var(--w70); white-space: nowrap; text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: var(--w25); text-underline-offset: 6px; cursor: pointer; transition: color var(--t) ease, text-decoration-color var(--t) ease; }
.link .arr { margin-left: 6px; }
@media (hover: hover) {
  .link:hover { color: var(--text); text-decoration-color: var(--accent); }
  .link--danger:hover { color: var(--error); text-decoration-color: var(--error); }
  .link:hover .arr { transform: translate(2px, -2px); }
}
.back { margin: -16px 0 8px; }
.back::before { content: "\2190"; display: inline-block; margin-right: 8px; }

/* ---- forms: the label above in caps, the field one surface up with a 3px corner; focus = a white edge and ring */
.field { display: block; min-width: 0; margin: 0 0 24px; }
.field__l { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 8px; font: 600 var(--fs-5)/1.4 var(--font-h); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.field__l .req { color: var(--accent); }
.opt { color: var(--w50); font-weight: 500; letter-spacing: .05em; text-align: right; }
.input, .select, .textarea { display: block; width: 100%; min-height: 48px; margin: 0; padding: 11px 14px; background: var(--s1); border: 1px solid var(--edge); border-radius: var(--r); color: var(--text); font: 400 var(--fs-3)/24px var(--font-b); transition: border-color var(--t) ease, box-shadow var(--t) ease; -webkit-appearance: none; appearance: none; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.input::placeholder, .textarea::placeholder { color: var(--w50); opacity: 1; }
.input:disabled, .select:disabled { opacity: .5; }
.select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23BDC8D0' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.select option { background: var(--s2); color: var(--text); }
@media (hover: hover) { .input:hover:not(:focus):not(:disabled), .select:hover:not(:focus):not(:disabled), .textarea:hover:not(:focus) { border-color: var(--outline); } }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--error); }
.field.is-invalid .input:focus, .field.is-invalid .select:focus, .field.is-invalid .textarea:focus { box-shadow: 0 0 0 1px var(--error); }
.field--bare .field__l { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* kept for screen readers and autofill */
.field--small .input { max-width: 280px; }
.err { display: block; margin: 8px 0 0; font-size: var(--fs-4); line-height: 1.5; color: var(--error); }
.hint { display: block; margin: 8px 0 0; font-size: var(--fs-4); line-height: 1.5; color: var(--w50); }
.check { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.toolbar { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; margin: 0 0 32px; }
.toolbar .field { margin: 0; }
@media (max-width: 767px) { .toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } .toolbar .field--search { grid-column: 1 / -1; } }
/* the editor's save bar stays at the foot of the screen while the form is in view */
.form-foot { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 16px; margin-top: 40px; padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
.dirty { font-size: var(--fs-4); color: var(--text-3); }

/* ---- status: a dot and a caps word (accent = published, hollow = draft); "Home" = a small outlined mark */
.chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; vertical-align: middle; }
.chip { display: inline-flex; align-items: center; gap: 8px; font: 600 11px/16px var(--font-h); letter-spacing: .15em; text-transform: uppercase; color: var(--w50); white-space: nowrap; }
.chip::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; }
.chip--published { color: var(--text); }
.chip--published::before { background: var(--accent); border-color: var(--accent); }
.chip--home { padding: 3px 8px; border: 1px solid var(--w25); border-radius: var(--r); color: var(--w70); }
.chip--home::before { display: none; }

/* ---- the list (desktop rows, phone cards) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 0 24px 12px 0; border-bottom: 1px solid var(--edge); text-align: left; font: 600 var(--fs-5)/1.4 var(--font-h); letter-spacing: .1em; text-transform: uppercase; color: var(--w50); white-space: nowrap; }
.table td { padding: 14px 24px 14px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; transition: background-color .25s var(--ease); }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:focus-visible { outline-offset: -2px; }
@media (hover: hover) { .table tr[data-href]:hover td { background: var(--nav); } }
.table .t { font-weight: 600; overflow-wrap: anywhere; }
.table .s { margin-top: 4px; color: var(--text-3); font-size: var(--fs-4); }
.table .td-thumb { width: 120px; }
.table .td-act { width: 1%; text-align: right; white-space: nowrap; }
.thumb { width: 96px; height: 72px; object-fit: cover; flex: none; background: var(--s1); border-radius: var(--r); }
.thumb--ph { display: grid; place-items: center; padding: 4px; text-align: center; font: 600 10px/1.2 var(--font-h); letter-spacing: .15em; text-transform: uppercase; color: var(--w50); }
.cards { border-top: 1px solid var(--line-2); }
.card { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; align-items: center; width: 100%; min-height: 72px; margin: 0; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line-2); background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background-color .25s var(--ease); }
.card .thumb { width: 88px; height: 66px; }
.card__b { min-width: 0; display: grid; gap: 4px; }
.card .t { font-weight: 600; overflow-wrap: anywhere; }
.card .s { color: var(--text-3); font-size: var(--fs-4); }
.card__go { color: var(--w50); }
@media (hover: hover) { .card:hover { background: var(--nav); } }
.empty { padding: 56px 24px; border: 1px dashed var(--edge); border-radius: var(--r); text-align: center; color: var(--text-3); }
.empty b { display: block; margin: 0 0 8px; font: 700 var(--fs-2)/1.2 var(--font-h); color: var(--text); }
.empty p { margin: 24px 0 0; }
.desktop-only { display: contents; } .phone-only { display: none; }
@media (max-width: 760px) { .desktop-only { display: none; } .phone-only { display: block; } }

/* ---- the project editor: the status column (desktop), a compact bar above the photos (tablets, phones) */
.side { position: sticky; top: calc(var(--hdr) + 32px); }
.side__bar { display: grid; gap: 16px; }
.side__cover { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.side__st { display: grid; gap: 8px; min-width: 0; }
.side__note { margin: 0; font-size: var(--fs-4); color: var(--text-3); }
.side__go .btn { width: 100%; }
.side__more { margin-top: 24px; }
.side__more summary { list-style: none; cursor: pointer; }
.side__more summary::-webkit-details-marker { display: none; }
.side__more .stack { display: grid; border-top: 1px solid var(--line-2); }
.side__act { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--line-2); background: none; font: 600 var(--fs-5)/1 var(--font-h); letter-spacing: .1em; text-transform: uppercase; color: var(--w70); text-align: left; text-decoration: none; cursor: pointer; transition: color var(--t) ease; }
.side__act .arr { color: var(--w50); }
@media (hover: hover) {
  .side__act:hover { color: var(--text); }
  .side__act:hover .arr { transform: translate(2px, -2px); }
  .side__act--danger:hover { color: var(--error); }
}
.side__more p { margin: 16px 0 0; font-size: var(--fs-4); line-height: 1.6; color: var(--w50); }
@media (min-width: 1001px) { .side__more summary { display: none; } }
@media (max-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .side { order: -1; position: static; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
  .side__bar { grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: 16px; }
  .side__cover { width: 88px; height: 66px; aspect-ratio: auto; }
  .side__go .btn { width: auto; }
  .side__more { margin-top: 8px; }
  .side__more .stack { margin-top: 8px; }
  .side__more[open] summary .link { color: var(--text); text-decoration-color: var(--accent); }
}
@media (max-width: 480px) {
  .side__bar { grid-template-columns: 88px minmax(0, 1fr); }
  .side__go { grid-column: 1 / -1; }
  .side__go .btn { width: 100%; }
}

/* ---- photos: the drop row, then the tiles (picture, order, main, alt text) */
.drop { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 20px; border: 1px dashed var(--edge); border-radius: var(--r); transition: border-color var(--t) ease, background-color var(--t) ease; }
.drop.is-over { border-color: var(--accent); background: var(--s1); }
.drop.is-full { padding: 0; border: 0; }   /* full: one plain line, no box, no dead button */
.drop.is-full .btn { display: none; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop p { margin: 0; font-size: var(--fs-4); color: var(--text-3); }
.upl { display: grid; margin-top: 16px; border-top: 1px solid var(--line-2); }
.upl__i { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: var(--fs-4); color: var(--text-2); }
.upl__i.is-err { color: var(--error); }
.upl__i.is-ok { color: var(--w50); }
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 20px; margin-top: 28px; }
.pic { display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: opacity var(--t) ease; }
.pic.is-dragging { opacity: .45; }
.pic.is-dragging .pic__img { outline: 2px solid #fff; outline-offset: -2px; }
.pics.is-sorting .pic { cursor: grabbing; }
.pic__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--s1); border-radius: var(--r); }
.pic__img img { width: 100%; height: 100%; object-fit: cover; }
.pic__n { position: absolute; left: 0; top: 0; padding: 8px 10px; background: var(--plate); color: #fff; font: 600 11px/1 var(--font-h); letter-spacing: .15em; font-variant-numeric: tabular-nums; }
.pic__main { position: absolute; right: 0; top: 0; padding: 8px 10px; background: var(--accent); color: #fff; font: 700 10px/1 var(--font-h); letter-spacing: .15em; text-transform: uppercase; }
.handle { display: grid; place-items: center; width: 44px; height: 44px; color: var(--w50); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; transition: color var(--t) ease; }
.handle svg { width: 16px; height: 16px; }
.pic__handle { position: absolute; right: 0; bottom: 0; background: var(--plate); color: #fff; }
@media (hover: hover) { .handle:hover { color: var(--text); } }
.pic__ctl { display: flex; align-items: center; gap: 12px; }
.pic__ctl .link--danger { margin-left: auto; }
.pic .field { margin: 0; }
.pic__meta { font-size: var(--fs-5); color: var(--w50); overflow-wrap: anywhere; }
/* the move pair: two 44px squares sharing an edge */
.mv { display: inline-flex; flex: none; }
.mv__b { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--w25); background: none; color: var(--w70); font: 500 var(--fs-3)/1 var(--font-b); cursor: pointer; transition: color var(--t) ease, border-color var(--t) ease; }
.mv__b:first-child { border-radius: var(--r) 0 0 var(--r); }
.mv__b:last-child { border-radius: 0 var(--r) var(--r) 0; }
.mv__b + .mv__b { margin-left: -1px; }
.mv__b:disabled { color: var(--w25); cursor: default; }
.mv__b:active:not(:disabled) { transform: translateY(1px); }
.mv__b:focus-visible { position: relative; z-index: 1; }
@media (hover: hover) { .mv__b:not(:disabled):hover { position: relative; z-index: 1; color: var(--text); border-color: var(--w70); } }

/* ---- the home page's list: one row per project; the handle, the picture, the name, then the actions */
.order { margin: 0 0 40px; border-top: 1px solid var(--line-2); }
.order__i { display: grid; grid-template-columns: 44px 96px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); background: var(--bg); transition: opacity var(--t) ease, background-color .25s var(--ease); }
.order__i.is-dragging { opacity: .5; background: var(--nav); }
.order.is-sorting .order__i { cursor: grabbing; }
.order__t { display: grid; gap: 4px; min-width: 0; }
.order__t .t { font-weight: 600; overflow-wrap: anywhere; text-decoration: none; transition: color var(--t) ease; }
.order__t .s { font-size: var(--fs-4); color: var(--text-3); }
.order__n { color: var(--w50); font: 500 var(--fs-4)/1 var(--font-b); font-variant-numeric: tabular-nums; }
.order__ctl { display: flex; align-items: center; gap: 20px; }
@media (hover: hover) { .order__t a.t:hover { color: var(--accent); } }
.add { display: flex; align-items: flex-end; gap: 12px; max-width: 640px; }
.add .field { flex: 1; margin: 0; }
.add .btn { flex: none; min-height: 48px; }
@media (max-width: 767px) {
  .order__i { grid-template-columns: 44px minmax(0, 1fr); gap: 8px 12px; padding: 12px 0 4px; }
  .order__i > .handle { grid-row: 1 / span 2; align-self: start; }
  .order__i .thumb, .order__i .order__t { grid-column: 2; }
  .order__i .order__ctl { grid-column: 1 / -1; }
  .order__ctl .mv { margin-right: auto; }
  .add { flex-direction: column; align-items: stretch; }
}

/* ---- dialogs: on the nav surface, a hairline frame, the actions pinned to the foot */
dialog { width: min(92vw, 520px); max-height: min(90dvh, 900px); padding: 0; overflow: auto; overscroll-behavior: contain; background: var(--nav); color: var(--text); border: 1px solid var(--w10); border-radius: var(--r); box-shadow: 0 24px 64px rgba(0, 0, 0, .5); }
dialog[open] { animation: rise .45s var(--ease); }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
.dlg { padding: 28px 28px 0; }
.dlg h2 { margin: 0 0 16px; }
.dlg > p { margin: 0; max-width: 52ch; color: var(--text-3); line-height: 1.6; }
.dlg .actions { position: sticky; bottom: 0; z-index: 2; justify-content: flex-end; margin: 28px -28px 0; padding: 16px 28px; background: var(--nav); border-top: 1px solid var(--line); }
@media (max-width: 767px) {
  dialog { width: calc(100vw - 32px); }
  .dlg { padding: 24px 20px 0; }
  .dlg .actions { margin: 24px -20px 0; padding: 12px 20px; }
}

/* ---- toasts: one line each at the foot, three at most */
.toasts { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 10000; display: grid; justify-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 560px; padding: 14px 20px; background: var(--text-2); color: var(--bg); border-radius: var(--r); font: 500 var(--fs-4)/1.45 var(--font-b); box-shadow: 0 8px 32px rgba(0, 0, 0, .45); animation: rise .5s var(--ease); transition: opacity .4s var(--ease-io), transform .4s var(--ease-io); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
.toast--error { background: var(--error-bg); color: var(--on-error); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.rise { animation: rise .6s var(--ease); }

/* ---- sign in: the logo, then the form alone, centred: two fields, the button, an error under it when there is one */
/* the sign-in page: the canvas is the logo's own grey (#262626, the PNG's background), so the mark sits in the top
   right corner without a box around it; the fields alone in the middle */
.login { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 96px var(--gut) 64px; background: #262626; }
.login__logo { position: absolute; top: 24px; right: var(--gut); height: 30px; width: auto; margin: 0; }
.login .input { background: #1B1C1C; border-color: rgba(255, 255, 255, .14); }
@media (max-width: 767px) { .login__logo { top: 20px; height: 24px; } }
.login__box { width: min(100%, 360px); }
.login__box .field { margin: 0 0 12px; }
.login__box .btn--block { margin-top: 12px; }
.login__line { margin: 0 0 24px; color: var(--text-3); line-height: 1.6; }
.login [data-field="form"] { min-height: 40px; }   /* the error's line is kept, so the form never jumps */
.login__err { margin: 16px 0 0; }
.login .field--code .input { max-width: none; }

/* ---- two-factor sign-in */
.totp { display: grid; gap: 20px; margin: 0 0 24px; }
.totp__qr { display: grid; place-items: center; width: 196px; height: 196px; padding: 12px; background: #fff; border-radius: var(--r); }
.totp__qr svg { display: block; width: 100%; height: 100%; }
.totp__noqr { color: var(--bg); font-size: var(--fs-4); text-align: center; }
.totp__words { min-width: 0; }
.totp__words p { margin: 0 0 16px; color: var(--text-3); line-height: 1.6; }
.totp__words .totp__key { margin: 0; }
.totp__key { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.totp__key .field__l { grid-column: 1 / -1; margin: 0; }
.totp__secret { display: block; min-height: 44px; padding: 12px 14px; background: var(--s1); border: 1px solid var(--edge); border-radius: var(--r); font-family: var(--font-mono); font-size: var(--fs-4); line-height: 18px; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.totp__state { margin: 0 0 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.field--code .input { max-width: 240px; min-height: 56px; font: 600 24px/1 var(--font-h); letter-spacing: .2em; text-align: center; }

/* ---- account: the website's key / value block */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 14px 32px; margin: 0 0 28px; }
.kv dt { font: 600 var(--fs-5)/1.5 var(--font-h); letter-spacing: .1em; text-transform: uppercase; color: var(--w50); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv .err, .kv__note { display: block; margin-top: 6px; }
.kv__note { font-size: var(--fs-4); line-height: 1.5; color: var(--w50); }
@media (max-width: 720px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 4px; } .kv dd { margin-bottom: 16px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
