:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #24282d;
  --muted: #66707a;
  --line: #d9dee3;
  --line-soft: #e8ecef;

  --brand: #345f7d;
  --brand-soft: #eef5f9;
  --brand-line: #c9dce8;

  --danger: #8f3f3f;
  --danger-soft: #fff5f5;
  --danger-line: #e5c2c2;

  --success: #3b7454;
  --success-soft: #f1f8f4;
  --success-line: #c8dfd1;

  --warning: #8a6418;
  --warning-soft: #fff9ec;
  --warning-line: #ead9ad;

  --radius: 8px;
  --shadow-soft: 0 1px 2px rgba(20, 30, 40, 0.05);
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

/* Header: calm service identity, not decoration. */
header,
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px 10px;
}

header h1,
.site-header h1 {
  max-width: var(--content-width);
  margin: 0 auto 9px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
}

header h1 a,
header h1 a:visited,
.site-header h1 a,
.site-header h1 a:visited {
  color: var(--text);
  text-decoration: none;
}

header h1 a:hover,
.site-header h1 a:hover {
  color: var(--brand);
}

/* Navigation: compact map. */
nav {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

nav a,
nav a:visited {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

nav a:hover,
nav a:focus {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--brand-line);
}

/* Main page layout. */
main,
.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 22px 28px 36px;
}

h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.015em;
}

h3 {
  margin: 26px 0 10px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 650;
  color: var(--text);
}

p {
  margin: 0 0 12px;
}

a,
a:visited {
  color: var(--brand);
}

a:hover {
  color: #244761;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: #f1f3f5;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 1px 4px;
  word-break: break-word;
}

.muted {
  color: var(--muted);
  font-size: 0.94em;
}

/* Summary cards: compact facts only. */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

.card {
  min-width: 150px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.card strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
}

.card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

/* Tables: dense, structured, calm. */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

th,
td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

th {
  background: var(--surface-soft);
  color: #4f5964;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

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

tbody tr:hover td {
  background: #fbfcfd;
}

table a {
  font-weight: 600;
  text-decoration: none;
}

table a:hover {
  text-decoration: underline;
}

/* Definition lists: useful metadata, not a panel wall. */
dl {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 0;
  margin: 12px 0 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

dt,
dd {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}

dt {
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

dd {
  min-width: 0;
  word-break: break-word;
}

dt:last-of-type,
dd:last-of-type {
  border-bottom: 0;
}

/* Forms: compact task blocks. */
form {
  margin: 12px 0 18px;
}

main > form,
.content > form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

label {
  display: block;
  margin: 0 0 11px;
  color: #4f5964;
  font-weight: 650;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  max-width: 720px;
  margin-top: 4px;
  padding: 8px 9px;
  border: 1px solid #cfd6dc;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(52, 95, 125, 0.18);
  border-color: var(--brand);
}

input.wide {
  max-width: 100%;
}

/* Buttons: clear, quiet, predictable. */
button,
.button,
a.button {
  display: inline-block;
  width: auto;
  margin: 0 6px 6px 0;
  padding: 7px 11px;
  border: 1px solid #c4cbd2;
  border-radius: 7px;
  background: #fff;
  color: #2f3943;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover,
a.button:hover {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
  text-decoration: none;
}

/* Primary-looking actions stay restrained. */
main > p > a.button:first-child,
.content > p > a.button:first-child,
main > form button[type="submit"],
.content > form button[type="submit"] {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

main > form button[type="submit"]:hover,
.content > form button[type="submit"]:hover {
  background: #e4f0f6;
}

/* Inline forms inside tables should not become large panels. */
td form,
table form {
  display: inline;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

td button,
table button {
  padding: 5px 8px;
  margin: 0;
  font-size: 13px;
}

/* Destructive and restorative actions are visible only when present. */
button.danger,
.danger button,
form[action*="archive"] button,
form[action*="revoke"] button {
  color: var(--danger) !important;
  border-color: var(--danger-line) !important;
  background: var(--danger-soft) !important;
}

button.danger:hover,
.danger button:hover,
form[action*="archive"] button:hover,
form[action*="revoke"] button:hover {
  border-color: var(--danger) !important;
  background: #ffecec !important;
}

form[action*="restore"] button {
  color: var(--success) !important;
  border-color: var(--success-line) !important;
  background: var(--success-soft) !important;
}

form[action*="restore"] button:hover {
  border-color: var(--success) !important;
  background: #e8f4ed !important;
}

/* Messages: calm unless action is needed. */
.error,
.success,
.warning {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
}

.error {
  color: var(--danger);
  border-color: var(--danger-line);
  border-left: 4px solid var(--danger);
  background: var(--danger-soft);
}

.success {
  color: var(--success);
  border-color: var(--success-line);
  border-left: 4px solid var(--success);
  background: var(--success-soft);
}

.warning {
  color: var(--warning);
  border-color: var(--warning-line);
  border-left: 4px solid var(--warning);
  background: var(--warning-soft);
}

/* Footer: low priority. */
footer,
.site-footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 18px 28px 28px;
  color: var(--muted);
  font-size: 12px;
  background: transparent;
}

/* Small screens: preserve operation. */
@media (max-width: 760px) {
  header,
  .site-header,
  main,
  .content,
  footer,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  header h1,
  .site-header h1,
  nav {
    max-width: none;
  }

  .cards {
    display: block;
  }

  .card {
    margin-bottom: 8px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  dl {
    display: block;
  }

  dt {
    border-bottom: 0;
  }

  dd {
    border-bottom: 1px solid var(--line-soft);
  }
}

/* style-pass-2c: restrained CFTS brand integration.
   Brand is identity and accent, not decoration. */

:root {
  --brand: #0077a8;
  --brand-strong: #005f85;
  --brand-soft: #e4f5fb;
  --brand-line: #c4dde8;
  --accent-warm: #c96500;
}

/* Header logo layout. */
header h1,
.site-header h1 {
  margin-bottom: 8px;
}

.site-brand,
.site-brand:visited {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--brand-strong);
  text-decoration: none;
}

.site-logo {
  display: block;
  width: min(178px, 42vw);
  height: auto;
  flex: 0 0 auto;
}

.site-logo-for-dark {
  display: none;
}

.site-title {
  display: inline-block;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
}

/* Respect browser dark mode without adding application behaviour. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111312;
    --surface: #181a18;
    --surface-soft: #20231f;
    --text: #f2f1eb;
    --muted: #a6aaa4;
    --line: #30342f;
    --line-soft: #252a25;

    --brand: #0093d1;
    --brand-strong: #8bd7f4;
    --brand-soft: #082536;
    --brand-line: #16455b;
    --accent-warm: #f78f1e;

    --danger: #ff8f8f;
    --danger-soft: #351a1a;
    --danger-line: #633030;

    --success: #8bd7a1;
    --success-soft: #183222;
    --success-line: #315a3d;

    --warning: #f78f1e;
    --warning-soft: #362711;
    --warning-line: #694514;

    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.28);
  }

  input,
  select,
  textarea {
    background: var(--surface-soft);
    color: var(--text);
    border-color: var(--line);
  }

  code {
    background: var(--surface-soft);
    border-color: var(--line);
  }

  .site-logo-for-light {
    display: none;
  }

  .site-logo-for-dark {
    display: block;
  }
}

/* Warm accent only on interaction. */
nav a:hover,
nav a:focus,
button:hover,
.button:hover,
a.button:hover {
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 45%, var(--line));
}

/* Keep primary actions blue, not orange. */
main > p > a.button:first-child,
.content > p > a.button:first-child,
main > form button[type="submit"],
.content > form button[type="submit"] {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

/* Small screens: avoid logo crowding. */
@media (max-width: 640px) {
  .site-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .site-title {
    padding-left: 0;
    border-left: 0;
    font-size: 14px;
  }

  .site-logo {
    width: min(170px, 68vw);
  }
}

/* style-pass-2d: dark-mode table hover contrast fix.
   Prevent light hover bars from washing out table text. */

@media (prefers-color-scheme: dark) {
  tbody tr:hover td {
    background: #20231f;
    color: var(--text);
  }

  tbody tr:hover a {
    color: var(--brand-strong);
  }

  th {
    background: #1d211d;
    color: #9fb0bd;
  }

  table {
    background: var(--surface);
    border-color: var(--line);
  }

  td {
    border-bottom-color: var(--line-soft);
  }
}

/* style-pass-2e: make the file-manager header navigation human-readable.
   This app is for users/admins managing files, so text beats mystery icons. */

header,
.site-header {
  display: block;
  min-height: auto;
  padding-top: 12px;
  padding-bottom: 10px;
}

header h1,
.site-header h1 {
  margin-bottom: 10px;
}

nav {
  justify-content: flex-start;
  gap: 7px;
}

nav a,
nav a:visited {
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

nav a:hover,
nav a:focus {
  background: var(--brand-soft);
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 45%, var(--line));
  text-decoration: none;
}

/* Keep logo calm and prevent it dominating the working area. */
.site-logo {
  width: min(170px, 40vw);
}

.site-title {
  font-size: 14px;
  color: var(--muted);
}

/* Dark mode header/nav tuning. */
@media (prefers-color-scheme: dark) {
  nav a,
  nav a:visited {
    background: #181a18;
    border-color: #30342f;
    color: #a6aaa4;
  }

  nav a:hover,
  nav a:focus {
    background: #20231f;
    color: var(--accent-warm);
    border-color: color-mix(in srgb, var(--accent-warm) 45%, #30342f);
  }
}

/* On small screens, keep navigation obvious and tappable. */
@media (max-width: 640px) {
  nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  nav a,
  nav a:visited {
    text-align: center;
  }
}

/* style-pass-2i: header balance polish.
   Keep CFTS identity present, but keep the file manager work area dominant. */

header,
.site-header {
  padding-top: 10px;
  padding-bottom: 9px;
}

header h1,
.site-header h1 {
  margin-bottom: 9px;
}

.site-brand {
  gap: 10px;
}

.site-logo {
  width: min(154px, 36vw);
}

.site-title {
  padding-left: 10px;
  border-left-color: color-mix(in srgb, var(--line) 70%, transparent);
  font-size: 14px;
  line-height: 1.2;
}

nav a,
nav a:visited {
  min-height: 30px;
  padding: 6px 10px;
}

@media (max-width: 640px) {
  .site-logo {
    width: min(150px, 64vw);
  }
}

/* style-pass-2j: final header correction.
   Force the light CFTS logo on the dark header and place the app title below it.
   Nav remains on the same visual row as the brand area. */

header,
.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "brand nav";
  align-items: start;
  column-gap: 26px;
  row-gap: 0;
  padding: 11px 28px 10px;
}

header h1,
.site-header h1 {
  grid-area: brand;
  max-width: none;
  margin: 0;
}

.site-brand,
.site-brand:visited {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  align-items: start;
  color: var(--text);
  text-decoration: none;
}

.site-logo {
  display: block !important;
  width: 158px;
  max-width: 42vw;
  height: auto;
}

.site-title {
  display: block;
  padding-left: 0;
  border-left: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.15;
}

.site-logo-for-light,
.site-logo-for-dark {
  display: none !important;
}

nav {
  grid-area: nav;
  max-width: none;
  margin: 4px 0 0;
  justify-content: flex-start;
  align-self: start;
}

nav a,
nav a:visited {
  min-height: 30px;
  padding: 6px 10px;
}

/* Dark mode: keep the light logo visible and text readable. */
@media (prefers-color-scheme: dark) {
  .site-logo {
    display: block !important;
  }

  .site-title {
    color: #f2f1eb;
  }
}

/* Small screens: stack naturally. */
@media (max-width: 700px) {
  header,
  .site-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav";
    row-gap: 10px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-logo {
    width: 156px;
    max-width: 70vw;
  }

  nav {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
  }
}

/* style-pass-2k: logo/title correction.
   Use the alternate CFTS logo and make the app title a quiet caption under it. */

.site-brand,
.site-brand:visited {
  justify-items: center;
  text-align: center;
}

.site-logo {
  width: 158px;
  max-width: 42vw;
}

.site-title {
  width: 100%;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
}

.site-brand:hover .site-title {
  color: var(--accent-warm);
}

@media (prefers-color-scheme: dark) {
  .site-title {
    color: #a6aaa4;
  }

  .site-brand:hover .site-title {
    color: var(--accent-warm);
  }
}

@media (max-width: 700px) {
  .site-brand,
  .site-brand:visited {
    justify-items: start;
    text-align: left;
  }

  .site-title {
    text-align: left;
  }
}

/* style-pass-2l: centre nav buttons with the logo.
   The caption belongs under the logo; nav aligns visually with the logo mark/text block. */

header,
.site-header {
  align-items: start;
  column-gap: 28px;
}

header h1,
.site-header h1 {
  line-height: 1;
}

.site-brand,
.site-brand:visited {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.site-logo {
  width: 158px;
  max-width: 42vw;
}

.site-title {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.15;
}

/* Nav top offset is tuned to align with the vertical centre of the logo image, not the caption. */
nav {
  margin-top: 21px;
  align-self: start;
}

nav a,
nav a:visited {
  min-height: 30px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Slightly smaller logo means slightly less nav offset. */
@media (max-width: 700px) {
  nav {
    margin-top: 0;
  }
}

/* style-pass-2m: dense volume table mode.
   Optimise lists for hundreds of files without changing backend behaviour. */

table {
  font-size: 13px;
  margin-top: 10px;
  margin-bottom: 18px;
}

th,
td {
  padding: 6px 8px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 11px;
  line-height: 1.2;
}

td {
  font-size: 13px;
  line-height: 1.28;
}

/* Make identifiers and timestamps compact. */
td:first-child,
th:first-child {
  width: 1%;
  white-space: nowrap;
}

td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6),
td:nth-child(7),
td:nth-child(8) {
  white-space: nowrap;
}

/* Let filenames/details use the remaining width and wrap only when needed. */
td:nth-child(2) {
  min-width: 220px;
  max-width: 520px;
  overflow-wrap: anywhere;
}

/* Admin event/details tables need details to wrap instead of forcing huge width. */
td:last-child {
  max-width: 620px;
  overflow-wrap: anywhere;
}

/* Links inside dense tables should be easy to scan but not visually noisy. */
table a {
  font-weight: 650;
}

/* Compact empty rows. */
td[colspan] {
  color: var(--muted);
  padding: 10px 8px;
}

/* Dark-mode sticky table headers should remain readable while scrolling. */
@media (prefers-color-scheme: dark) {
  th {
    background: #1b1f1b;
  }
}

/* On smaller screens, keep table usable rather than pretty. */
@media (max-width: 900px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  td:last-child {
    max-width: none;
  }
}

/* style-pass-2n: reduce blue/link visual weight.
   Blue remains the accent, but ordinary text and file names should not shout. */

/* Normal links: readable, not heavy. */
a,
a:visited {
  color: color-mix(in srgb, var(--brand-strong) 72%, var(--text));
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Table links are important but should scan like filenames, not buttons. */
table a,
table a:visited {
  color: var(--text);
  font-weight: 520;
  text-decoration: none;
}

table a:hover,
table a:focus {
  color: var(--brand-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Nav remains clear, but less visually heavy. */
nav a,
nav a:visited {
  color: var(--muted);
  font-weight: 620;
}

nav a:hover,
nav a:focus {
  color: var(--accent-warm);
}

/* Buttons: slightly less weight by default. */
button,
.button,
a.button {
  font-weight: 600;
}

/* Primary actions still identifiable, but not saturated. */
main > p > a.button:first-child,
.content > p > a.button:first-child,
main > form button[type="submit"],
.content > form button[type="submit"] {
  color: color-mix(in srgb, var(--brand-strong) 78%, var(--text));
  background: color-mix(in srgb, var(--brand-soft) 74%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-line) 76%, var(--line));
}

/* Header app caption stays quiet. */
.site-title {
  color: var(--muted);
  font-weight: 430;
}

/* Dark mode: avoid electric-blue text weight. */
@media (prefers-color-scheme: dark) {
  a,
  a:visited {
    color: color-mix(in srgb, var(--brand-strong) 62%, var(--text));
  }

  table a,
  table a:visited {
    color: #e4e7e1;
    font-weight: 500;
  }

  table a:hover,
  table a:focus {
    color: var(--brand-strong);
  }

  main > p > a.button:first-child,
  .content > p > a.button:first-child,
  main > form button[type="submit"],
  .content > form button[type="submit"] {
    color: color-mix(in srgb, var(--brand-strong) 76%, var(--text));
    background: color-mix(in srgb, var(--brand-soft) 62%, var(--surface));
    border-color: color-mix(in srgb, var(--brand-line) 68%, var(--line));
  }
}

/* style-pass-2o: calm action buttons.
   Quick actions should be available, not visually dominant. */

button,
.button,
a.button,
a.button:visited {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  font-weight: 560;
  box-shadow: none;
}

button:hover,
.button:hover,
a.button:hover,
button:focus,
.button:focus,
a.button:focus {
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 45%, var(--line));
  text-decoration: none;
}

/* First/primary action: only a little more visible, not filled and shouty. */
main > p > a.button:first-child,
.content > p > a.button:first-child,
main > form button[type="submit"],
.content > form button[type="submit"] {
  background: transparent;
  color: color-mix(in srgb, var(--brand-strong) 58%, var(--text));
  border-color: color-mix(in srgb, var(--brand-line) 58%, var(--line));
}

main > p > a.button:first-child:hover,
.content > p > a.button:first-child:hover,
main > form button[type="submit"]:hover,
.content > form button[type="submit"]:hover {
  background: color-mix(in srgb, var(--brand-soft) 44%, transparent);
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 45%, var(--line));
}

/* Keep table inline actions even quieter. */
td button,
table button,
td .button,
table .button {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  font-weight: 540;
}

/* Dark mode button tuning. */
@media (prefers-color-scheme: dark) {
  button,
  .button,
  a.button,
  a.button:visited {
    background: transparent;
    color: #a6aaa4;
    border-color: #30342f;
  }

  button:hover,
  .button:hover,
  a.button:hover,
  button:focus,
  .button:focus,
  a.button:focus {
    background: #181a18;
    color: var(--accent-warm);
    border-color: color-mix(in srgb, var(--accent-warm) 45%, #30342f);
  }

  main > p > a.button:first-child,
  .content > p > a.button:first-child,
  main > form button[type="submit"],
  .content > form button[type="submit"] {
    background: transparent;
    color: color-mix(in srgb, var(--brand-strong) 55%, var(--text));
    border-color: color-mix(in srgb, var(--brand-line) 50%, var(--line));
  }
}

/* file-manager-phase-a: two-pane Library landing page.
   This is a navigation mechanism, not a decorative dashboard. */

.fm-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
}

.fm-page-head h2 {
  margin-bottom: 5px;
}

.fm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.fm-shell {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(0, 2.15fr);
  gap: 14px;
  align-items: start;
}

.fm-pane {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.fm-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.fm-pane-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.2;
}

.fm-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.fm-workspace-list {
  display: grid;
  gap: 0;
  max-height: min(62vh, 680px);
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.fm-workspace-list li {
  border-bottom: 1px solid var(--line-soft);
}

.fm-workspace-list li:last-child {
  border-bottom: 0;
}

.fm-workspace-link,
.fm-workspace-link:visited {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  color: var(--text);
  text-decoration: none;
}

.fm-workspace-link:hover,
.fm-workspace-link:focus {
  background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
  color: var(--text);
  text-decoration: none;
}

.fm-workspace-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.2;
}

.fm-workspace-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.fm-workspace-desc {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-file-table {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.fm-file-table th {
  top: 0;
}

.fm-file-table td:first-child {
  width: auto;
  white-space: normal;
}

.fm-file-table td:nth-child(1) {
  min-width: 260px;
}

.fm-file-table td:nth-child(2) {
  min-width: 180px;
  max-width: 360px;
}

.fm-file-table td:nth-child(3) {
  width: 1%;
  white-space: nowrap;
}

.fm-file-table td:nth-child(4) {
  width: 1%;
  white-space: nowrap;
}

.fm-location {
  color: var(--muted);
  font-size: 12px;
}

.fm-empty {
  margin: 0;
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
}

@media (prefers-color-scheme: dark) {
  .fm-pane {
    background: var(--surface);
    border-color: var(--line);
  }

  .fm-pane-head {
    background: #1b1f1b;
  }

  .fm-workspace-link:hover,
  .fm-workspace-link:focus {
    background: #20231f;
  }
}

@media (max-width: 900px) {
  .fm-shell {
    grid-template-columns: 1fr;
  }

  .fm-workspace-list {
    max-height: none;
  }
}

/* file-manager-phase-b: workspace detail layout. */

.fm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.fm-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.fm-breadcrumb a:hover {
  color: var(--accent-warm);
  text-decoration: underline;
}

.fm-summary-list {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.fm-summary-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  border-bottom: 1px solid var(--line-soft);
}

.fm-summary-list div:last-child {
  border-bottom: 0;
}

.fm-summary-list dt,
.fm-summary-list dd {
  border-bottom: 0;
}

.fm-note {
  margin: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
  color: var(--muted);
  font-size: 13px;
}

.fm-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.fm-note p {
  margin: 0;
}

.fm-management {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fm-management summary {
  padding: 9px 11px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.fm-management summary:hover {
  color: var(--accent-warm);
}

.fm-management-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.fm-management-grid form {
  margin: 0;
}

@media (max-width: 900px) {
  .fm-management-grid {
    grid-template-columns: 1fr;
  }
}

/* style-pass-2p: calm workspace management panels.
   Management is secondary. Navigation and files stay visually dominant. */

.fm-management {
  background: transparent;
  border-color: var(--line);
  box-shadow: none;
}

.fm-management summary {
  background: color-mix(in srgb, var(--surface-soft) 56%, transparent);
  color: var(--muted);
  font-size: 13px;
}

.fm-management[open] summary {
  border-bottom: 1px solid var(--line);
}

.fm-management-grid {
  background: transparent;
}

.fm-management-grid form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: none;
}

.fm-management-grid form h3 {
  margin-top: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
}

.fm-management-grid label {
  color: var(--muted);
  font-weight: 560;
}

.fm-management-grid input,
.fm-management-grid textarea {
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--line);
}

.fm-management-grid button {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.fm-management-grid button:hover {
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 45%, var(--line));
}

.fm-management-grid form[action*="archive"] button {
  color: color-mix(in srgb, var(--danger) 72%, var(--muted)) !important;
  background: transparent !important;
  border-color: color-mix(in srgb, var(--danger-line) 70%, var(--line)) !important;
}

.fm-management-grid form[action*="archive"] button:hover {
  color: var(--danger) !important;
  background: color-mix(in srgb, var(--danger-soft) 50%, transparent) !important;
}

/* Dark mode: remove white panels completely. */
@media (prefers-color-scheme: dark) {
  .fm-management summary {
    background: #151815;
    color: #a6aaa4;
  }

  .fm-management-grid form {
    background: #151815;
    border-color: #30342f;
  }

  .fm-management-grid form h3,
  .fm-management-grid label {
    color: #a6aaa4;
  }

  .fm-management-grid input,
  .fm-management-grid textarea {
    background: #20231f;
    color: #f2f1eb;
    border-color: #30342f;
  }

  .fm-management-grid button {
    background: transparent;
    color: #a6aaa4;
    border-color: #30342f;
  }
}

/* tabulator-poc-2: calm CFTS table styling for Library Browser. */

.browser-tabulator {
  min-height: 420px;
}

.browser-grid-fallback {
  margin: 8px 10px 10px;
  color: var(--muted);
  font-size: 12px;
}

.tabulator {
  border: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.tabulator .tabulator-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.tabulator .tabulator-header .tabulator-col {
  border-right: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.tabulator .tabulator-header .tabulator-col-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.tabulator .tabulator-header-filter input {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}

.tabulator .tabulator-tableholder {
  background: var(--surface);
}

.tabulator .tabulator-row {
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--text);
}

.tabulator .tabulator-row.tabulator-row-even {
  background: var(--surface);
}

.tabulator .tabulator-row:hover {
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
}

.tabulator .tabulator-cell {
  border-right: 1px solid var(--line-soft);
}

.tabulator a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.tabulator a:hover {
  color: var(--accent-warm);
  text-decoration: underline;
}

.tabulator .tabulator-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.tabulator .tabulator-page,
.tabulator .tabulator-page-size {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  .tabulator,
  .tabulator .tabulator-tableholder,
  .tabulator .tabulator-row,
  .tabulator .tabulator-row.tabulator-row-even {
    background: var(--surface);
    color: var(--text);
  }

  .tabulator .tabulator-header,
  .tabulator .tabulator-header .tabulator-col,
  .tabulator .tabulator-footer {
    background: #1b1f1b;
  }

  .tabulator .tabulator-row:hover {
    background: #20231f;
  }

  .tabulator .tabulator-header-filter input {
    background: #20231f;
    color: #f2f1eb;
    border-color: #30342f;
  }
}

/* tabulator-poc-3: tidy Library Browser layout and grid tone. */

.browser-head {
  margin: 0 0 12px;
}

.browser-head h2 {
  margin: 0 0 5px;
}

.browser-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.library-browser {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(0, 2.4fr);
  gap: 14px;
  align-items: start;
}

.browser-tree,
.browser-files {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.browser-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.browser-pane-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 680;
}

.browser-pane-head p {
  margin: 2px 0 0;
  font-size: 12px;
}

.browser-pane-head > a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.browser-pane-head > a:hover {
  color: var(--accent-warm);
  text-decoration: underline;
}

.browser-tree-list,
.browser-folder-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.browser-tree-list {
  max-height: min(68vh, 760px);
  overflow: auto;
}

.browser-workspace {
  border-bottom: 1px solid var(--line-soft);
}

.browser-workspace-link,
.browser-workspace-link:visited {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  color: var(--text);
  text-decoration: none;
}

.browser-workspace-link span {
  font-size: 13px;
  font-weight: 620;
  line-height: 1.2;
}

.browser-workspace-link small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 480;
}

.browser-folder-list {
  padding: 0 0 6px 13px;
}

.browser-folder-list a,
.browser-folder-list a:visited {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 5px 10px 5px 11px;
  border-left: 1px solid var(--line-soft);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.browser-folder-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-folder-list small {
  color: var(--muted);
  font-size: 12px;
}

.browser-workspace-link:hover,
.browser-folder-list a:hover,
.browser-workspace.is-selected > .browser-workspace-link,
.browser-folder-list li.is-selected a {
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
  color: var(--text);
  text-decoration: none;
}

.browser-folder-list li.is-selected a {
  border-left-color: var(--accent-warm);
}

.browser-files-head {
  align-items: flex-start;
}

.browser-empty {
  margin: 0;
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
}

/* Tabulator: make it look native to the app, not pasted in. */

.browser-tabulator {
  min-height: 520px;
}

.tabulator {
  border: 0 !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-size: 13px !important;
}

.tabulator .tabulator-header {
  border-bottom: 1px solid var(--line) !important;
  background: var(--surface-soft) !important;
  color: var(--muted) !important;
}

.tabulator .tabulator-header .tabulator-col {
  border-right: 1px solid var(--line-soft) !important;
  background: var(--surface-soft) !important;
}

.tabulator .tabulator-header .tabulator-col-title {
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  text-transform: uppercase;
}

.tabulator .tabulator-col-sorter {
  opacity: 0.45;
}

.tabulator .tabulator-header-filter {
  padding-top: 4px !important;
}

.tabulator .tabulator-header-filter input {
  height: 24px !important;
  padding: 3px 6px !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-size: 12px !important;
}

.tabulator .tabulator-tableholder {
  background: var(--surface) !important;
}

.tabulator .tabulator-row,
.tabulator .tabulator-row.tabulator-row-even,
.tabulator .tabulator-row.tabulator-row-odd {
  min-height: 30px !important;
  border-bottom: 1px solid var(--line-soft) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
}

.tabulator .tabulator-row:hover {
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent) !important;
}

.tabulator .tabulator-cell {
  padding: 6px 7px !important;
  border-right: 1px solid var(--line-soft) !important;
}

.tabulator a {
  color: var(--text) !important;
  font-weight: 520 !important;
  text-decoration: none !important;
}

.tabulator a:hover {
  color: var(--accent-warm) !important;
  text-decoration: underline !important;
}

.tabulator .tabulator-footer {
  border-top: 1px solid var(--line) !important;
  background: var(--surface-soft) !important;
  color: var(--muted) !important;
}

.tabulator .tabulator-page,
.tabulator .tabulator-page-size {
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--muted) !important;
}

.browser-grid-fallback {
  margin: 8px 10px 10px;
  color: var(--muted);
  font-size: 12px;
}

@media (prefers-color-scheme: dark) {
  .browser-tree,
  .browser-files,
  .tabulator,
  .tabulator .tabulator-tableholder,
  .tabulator .tabulator-row,
  .tabulator .tabulator-row.tabulator-row-even,
  .tabulator .tabulator-row.tabulator-row-odd {
    background: #151815 !important;
    color: #f2f1eb !important;
  }

  .browser-pane-head,
  .tabulator .tabulator-header,
  .tabulator .tabulator-header .tabulator-col,
  .tabulator .tabulator-footer {
    background: #1b1f1b !important;
  }

  .browser-workspace-link:hover,
  .browser-folder-list a:hover,
  .browser-workspace.is-selected > .browser-workspace-link,
  .browser-folder-list li.is-selected a,
  .tabulator .tabulator-row:hover {
    background: #20231f !important;
  }

  .tabulator .tabulator-header-filter input {
    background: #20231f !important;
    color: #f2f1eb !important;
    border-color: #30342f !important;
  }
}

@media (max-width: 950px) {
  .library-browser {
    grid-template-columns: 1fr;
  }

  .browser-tree-list {
    max-height: none;
  }
}

/* tabulator-poc-4: grid daily-use tidy pass. */

.browser-grid-meta {
  margin: 8px 10px 7px;
  color: var(--muted);
  font-size: 12px;
}

.browser-grid-meta span {
  display: inline-block;
}

.tabulator .tabulator-header-filter input {
  height: 22px !important;
  padding: 2px 6px !important;
  font-size: 11px !important;
}

.tabulator .tabulator-cell {
  line-height: 1.25 !important;
}

.tabulator .grid-file-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.tabulator .grid-download-link {
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 520 !important;
}

.tabulator .grid-download-link:hover {
  color: var(--accent-warm) !important;
}

.tabulator .tabulator-footer {
  min-height: 32px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

.tabulator .tabulator-paginator {
  gap: 4px;
}

.tabulator .tabulator-page {
  min-width: 26px !important;
  padding: 3px 6px !important;
}

.tabulator .tabulator-page-size {
  height: 25px !important;
  padding: 2px 6px !important;
}

@media (prefers-color-scheme: dark) {
  .browser-grid-meta {
    color: #a6aaa4;
  }
}

/* tabulator-poc-5: compact columns and reduce right-side waste. */

.tabulator .tabulator-cell {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.tabulator .tabulator-header .tabulator-col {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.tabulator .tabulator-header .tabulator-col-title {
  padding-left: 6px !important;
  padding-right: 4px !important;
}

.tabulator .tabulator-header-filter {
  padding-left: 5px !important;
  padding-right: 5px !important;
}

.tabulator .grid-download-link {
  font-size: 11px !important;
}

.browser-files {
  max-width: 100%;
}

.browser-tabulator {
  overflow: hidden;
}

/* tabulator-poc-6: reduce empty grid height and make fallback quieter. */

.browser-grid-fallback {
  margin: 8px 10px 10px;
  color: var(--muted);
  font-size: 12px;
}

.browser-grid-fallback summary {
  display: inline-block;
  cursor: pointer;
  color: var(--muted);
  font-weight: 520;
}

.browser-grid-fallback summary:hover {
  color: var(--accent-warm);
}

.browser-grid-fallback a {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
}

.browser-grid-fallback a:hover {
  color: var(--accent-warm);
}

.browser-tabulator {
  min-height: 260px;
}

/* Let Tabulator height changes feel intentional. */
.tabulator {
  transition: height 120ms ease;
}

/* tabulator-poc-7: /admin/files grid page. */

.files-grid-page {
  max-width: 100%;
}

.files-grid-page .browser-tabulator {
  min-height: 260px;
}

/* tabulator: left-align action/download column. */

.tabulator .grid-download-link {
  display: inline-block;
  text-align: left !important;
}

.tabulator .tabulator-cell:has(.grid-download-link) {
  text-align: left !important;
}

/* tabulator-poc-8: shared file grid component.
   Page-specific grids now use .sfs-file-grid with data attributes. */

.sfs-file-grid {
  width: 100%;
}

/* file-grid-fix-right-margin: keep action column compact; let Name absorb spare width. */

.tabulator .tabulator-cell:has(.grid-download-link) {
  width: 76px !important;
  max-width: 76px !important;
  min-width: 76px !important;
  text-align: left !important;
}

.tabulator .grid-download-link {
  display: inline-block;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* file-grid-compact-workspace-folder: reduce metadata column visual weight. */

.tabulator .tabulator-cell[tabulator-field="workspace"],
.tabulator .tabulator-cell[tabulator-field="folder"] {
  max-width: 115px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabulator .tabulator-col[tabulator-field="workspace"],
.tabulator .tabulator-col[tabulator-field="folder"] {
  max-width: 115px;
}

/* file-grid-name-fill-width: full panel grid, spare width goes to Name. */

.tabulator .tabulator-table {
  min-width: 100% !important;
}

.tabulator .tabulator-tableholder {
  overflow-x: hidden;
}

.tabulator .tabulator-cell[tabulator-field="name"] {
  overflow: hidden;
}

/* tabulator-poc-9: folder detail page uses shared file grid. */

.files-grid-page + .fm-management {
  margin-top: 14px;
}

/* tabulator-poc-10: archived files grid restore action. */

.grid-inline-form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.grid-restore-button {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.grid-restore-button:hover {
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 45%, var(--line));
}

/* tabulator-poc-11: workspace management grid. */

.sfs-workspace-grid {
  width: 100%;
}

.workspace-grid-page .tabulator .tabulator-cell[tabulator-field="folder_count"],
.workspace-grid-page .tabulator .tabulator-cell[tabulator-field="file_count"] {
  font-variant-numeric: tabular-nums;
}

.workspace-grid-page .tabulator .tabulator-cell[tabulator-field="description"] {
  color: var(--muted);
}

/* public-homepage-v1: calm root landing page. */

.public-home {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 147, 209, 0.16), transparent 34rem),
    linear-gradient(135deg, #111611, #1a201b 55%, #111611);
  color: #f2f1eb;
}

.public-home-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.public-home-card {
  width: min(720px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(21, 24, 21, 0.92);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

.public-home-logo {
  width: 180px;
  max-width: 60vw;
  height: auto;
  margin-bottom: 26px;
}

.public-home-kicker {
  margin: 0 0 8px;
  color: #f78f1e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-home h1 {
  margin: 0 0 14px;
  max-width: 620px;
  color: #f2f1eb;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.public-home-copy {
  max-width: 620px;
  margin: 0 0 22px;
  color: #c8ccc4;
  font-size: 16px;
  line-height: 1.6;
}

.public-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.public-home-actions .button {
  border-color: rgba(247, 143, 30, 0.42);
  color: #f2f1eb;
  background: rgba(247, 143, 30, 0.12);
}

.public-home-actions .button:hover {
  border-color: #f78f1e;
  color: #ffffff;
}

.public-home-muted {
  margin: 0;
  color: #a6aaa4;
  font-size: 13px;
}

@media (max-width: 640px) {
  .public-home-shell {
    padding: 18px;
  }

  .public-home-card {
    padding: 24px;
  }
}

/* public-home-cfts-style: align root landing page with CFTS public-site visual language. */

.public-home-cfts {
  min-height: 100vh;
  margin: 0;
  background: #111312;
  color: #f2f1eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.public-home-cfts .public-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  width: min(100% - 36px, 1280px);
  margin: 0 auto;
  padding: 16px 0;
  background: color-mix(in srgb, #111312 78%, transparent);
  backdrop-filter: blur(12px);
}

.public-home-cfts .public-site-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.public-home-cfts .public-site-brand img {
  display: block;
  width: min(190px, 48vw);
  height: auto;
}

.public-home-cfts .public-hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17, 19, 18, 0.97) 0%, rgba(17, 19, 18, 0.84) 54%, rgba(17, 19, 18, 0.58) 100%),
    linear-gradient(0deg, #111312 0%, transparent 34%),
    url("media/background/network.png") 82% center / cover no-repeat;
}

.public-home-cfts .public-hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 18rem;
  content: "";
  background: linear-gradient(180deg, transparent, #111312);
}

.public-home-cfts .public-hero-inner {
  width: min(100% - 36px, 1280px);
  margin: 0 auto;
  padding: clamp(120px, 18vh, 190px) 0 clamp(44px, 8vh, 72px);
}

.public-home-cfts .public-eyebrow {
  margin: 0 0 12px;
  color: #f78f1e;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-home-cfts h1 {
  max-width: 850px;
  margin: 0;
  color: #f2f1eb;
  font-family: "Segoe UI Light", "Segoe UI", Arial, sans-serif;
  font-size: clamp(2.55rem, 7vw, 5.35rem);
  line-height: 1.02;
  font-weight: 300;
  letter-spacing: 0;
}

.public-home-cfts .public-lede {
  max-width: 800px;
  margin: 24px 0 0;
  color: #f2f1eb;
  font-size: clamp(1.08rem, 2.2vw, 1.42rem);
  line-height: 1.5;
}

.public-home-cfts .public-proof {
  max-width: 820px;
  margin: 22px 0 0;
  color: #a6aaa4;
  font-size: 0.98rem;
  line-height: 1.62;
}

.public-home-cfts .public-site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.public-home-cfts .public-site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid #30342f;
  border-radius: 6px;
  background: color-mix(in srgb, #181a18 74%, transparent);
  color: #8bd7f4;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.public-home-cfts .public-site-button-primary {
  background: #082536;
}

.public-home-cfts .public-site-button:hover,
.public-home-cfts .public-site-button:focus-visible {
  border-color: #f78f1e;
  color: #f78f1e;
  outline: 0;
}

@media (max-width: 640px) {
  .public-home-cfts .public-site-header,
  .public-home-cfts .public-hero-inner {
    width: min(100% - 32px, 1280px);
  }

  .public-home-cfts .public-site-header {
    position: absolute;
  }

  .public-home-cfts .public-site-brand img {
    width: min(178px, 68vw);
  }

  .public-home-cfts .public-hero {
    align-items: end;
    min-height: 100vh;
  }

  .public-home-cfts .public-hero-inner {
    padding: 130px 0 42px;
  }

  .public-home-cfts h1 {
    font-size: clamp(2.2rem, 13vw, 3.35rem);
    line-height: 0.98;
  }

  .public-home-cfts .public-site-button {
    width: 100%;
  }
}
