:root {
  --black: #0a0a0a;
  --white: #fff;
  --off-white: #fafafa;
  --grey-100: #f3f3f3;
  --grey-300: #dedede;
  --grey-600: #737373;
  --muted: #737373;
  --shadow: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--white); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--black);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--white);
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.nav {
  min-height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--grey-300);
  background: var(--white);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { display: block; width: 146px; height: 34px; object-fit: contain; }
.brand span { padding-left: 14px; border-left: 1px solid var(--grey-300); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.primary-nav { align-self: stretch; display: flex; align-items: stretch; gap: 28px; margin-left: auto; }
.primary-nav a { display: flex; align-items: center; position: relative; color: var(--grey-600); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.primary-nav a::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.primary-nav a:hover, .primary-nav a.active { color: var(--black); }
.primary-nav a.active::after { background: var(--black); }
.nav-actions { display: flex; gap: 22px; align-items: center; font-size: 12px; }
.nav-actions a { font-weight: 800; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.user-email { color: var(--grey-600); }
.inline-form { display: inline; }
.link-button { border: 0; padding: 0; background: transparent; cursor: pointer; color: var(--black); font-weight: 800; text-transform: uppercase; }

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
  align-items: stretch;
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 72px clamp(28px, 7vw, 120px); background: var(--white); }
.eyebrow, .section-number { color: var(--grey-600); font-size: 12px; letter-spacing: .18em; font-weight: 700; text-transform: uppercase; }
.eyebrow::before { display: none; }
h1 { margin: 22px 0 28px; font-size: clamp(48px, 5.6vw, 82px); line-height: .98; letter-spacing: -.055em; font-weight: 700; }
.hero-copy > p { max-width: 510px; margin: 0; color: var(--grey-600); font-size: 17px; line-height: 1.65; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--black); border-radius: 7px; background: var(--white); color: var(--black); font-weight: 700; text-decoration: none; cursor: pointer; transition: opacity .15s ease, background .15s ease, color .15s ease; }
.button:hover { opacity: .72; }
.button.primary { background: var(--black); color: var(--white); }
.button.primary:hover { background: var(--black); color: var(--white); }
.button.secondary { background: transparent; }
.button.small { min-height: 38px; padding: 0 14px; }
.button.full { width: 100%; }
.google-button { align-self: flex-start; min-height: 56px; margin-top: 34px; gap: 13px; }
.google-g { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--white); color: var(--black); font-weight: 900; }
.button.primary:hover .google-g { background: var(--black); color: var(--white); }
.fine-print { margin-top: 15px !important; font-size: 11px !important; letter-spacing: .04em; }

.identity-stage { min-height: 620px; display: grid; grid-template-rows: auto 1fr auto; margin: 48px 48px 48px 0; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--grey-300); background: var(--off-white); color: var(--black); }
.stage-top, .stage-footer { display: flex; justify-content: space-between; gap: 20px; color: var(--grey-600); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.stage-top { padding-bottom: 18px; border-bottom: 1px solid var(--grey-300); }
.stage-footer { padding-top: 18px; border-top: 1px solid var(--grey-300); }
.logo-frame { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-frame img { width: min(88%, 560px); }

.page-section { padding: 64px clamp(20px, 5vw, 72px) 100px; }
.wide { max-width: 1380px; margin: auto; }
.narrow { max-width: 720px; margin: 50px auto; text-align: center; }
.narrow h1 { font-size: clamp(44px, 7vw, 76px); }
.narrow > p { color: var(--grey-600); line-height: 1.7; }
.status-mark { width: 64px; height: 64px; margin: 0 auto 28px; display: grid; place-items: center; border: 1px solid var(--black); border-radius: 50%; background: var(--white); font-size: 26px; font-weight: 700; }
.status-mark.blocked { background: var(--black); color: var(--white); }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--grey-300); }
.page-header h1 { margin: 16px 0 0; font-size: clamp(40px, 5vw, 64px); }
.page-header h1.delivery-title { font-size: clamp(30px, 3.2vw, 44px); letter-spacing: -.035em; }
.date-chip { min-width: 160px; padding: 14px 18px; border: 1px solid var(--grey-300); border-radius: 8px; background: var(--white); }
.date-chip span { display: block; margin-bottom: 5px; font-size: 9px; letter-spacing: .16em; font-weight: 900; }
.date-chip b { font-size: 21px; }

.card { border: 1px solid var(--grey-300); border-radius: 12px; background: var(--white); box-shadow: none; }
.workspace-grid { display: grid; grid-template-columns: minmax(310px, 410px) minmax(0, 1fr); gap: 26px; align-items: start; }
.upload-card, .files-card, .admin-card { padding: 30px; }
h2 { margin: 12px 0 26px; font-size: 27px; font-weight: 700; letter-spacing: -.03em; }
label { display: block; margin: 18px 0; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
input, textarea, select { width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid var(--grey-300); border-radius: 7px; outline: none; background: var(--white); color: var(--black); }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px var(--grey-300); }
textarea { min-height: 120px; resize: vertical; }
.form-card { padding: 28px; margin-top: 34px; }
.notice { margin: 20px 0; padding: 15px 18px; border: 1px solid var(--grey-300); border-radius: 8px; background: var(--off-white); text-align: left; }
.notice.warning { border-left: 3px solid var(--black); background: var(--off-white); }
.direct-note { display: flex; gap: 12px; align-items: baseline; margin: -14px 0 26px; color: var(--grey-600); font-size: 13px; }
.direct-note b { color: var(--black); text-transform: uppercase; }
.direct-drive-grid { display: grid; grid-template-columns: minmax(340px, 520px) minmax(280px, 1fr); gap: 26px; align-items: start; }
.drive-action-card { padding: 30px; }
.drive-action-card > p { color: var(--grey-600); line-height: 1.65; }
.out-card { background: var(--off-white); color: var(--black); }
.out-card .muted, .out-card > p { color: var(--grey-600); }
.out-card .button.secondary { border-color: var(--black); color: var(--black); }
.naming-rule { padding: 13px; background: var(--grey-100); }
.naming-rule code { color: var(--black); font-weight: 900; }
.drop-zone { min-height: 170px; display: flex; margin-top: 22px; flex-direction: column; justify-content: center; align-items: center; border: 1px dashed var(--grey-600); border-radius: 9px; background: var(--off-white); cursor: pointer; transition: .15s ease; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--black); background: var(--grey-100); color: var(--black); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { font-size: 14px; }
.drop-zone small { margin-top: 5px; color: var(--grey-600); font-size: 12px; }
.drop-zone:hover small, .drop-zone.dragging small { color: var(--grey-600); }
.upload-arrow { margin-bottom: 10px; font-size: 32px; }
.folder-picker { margin-top: 12px; }
.folder-picker > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.folder-picker .button { margin-top: 8px; }
.selection-summary { margin: 12px 0 22px; color: var(--muted); font-size: 14px; text-align: center; }
.name-composer { margin-top: 8px; display: flex; align-items: center; border: 1px solid var(--grey-300); border-radius: 7px; background: var(--white); overflow: hidden; }
.name-composer span { padding-left: 13px; color: var(--grey-600); font-size: 13px; white-space: nowrap; }
.name-composer input { margin: 0; padding-left: 2px; border: 0; box-shadow: none; }
.preview { min-height: 38px; margin: -8px 0 18px; padding: 10px 12px; border-radius: 6px; background: var(--grey-100); color: var(--black); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
.download-card { margin-top: 26px; }
.progress-wrap { margin-top: 18px; color: var(--grey-600); font-size: 14px; }
.progress { height: 6px; margin-bottom: 7px; background: var(--grey-300); }
.progress span { display: block; width: 0; height: 100%; background: var(--black); transition: width .15s; }
.upload-stay-warning { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--black); background: var(--grey-100); color: var(--black); font-size: 13px; font-weight: 700; line-height: 1.45; }
.form-message { margin-top: 14px; font-size: 13px; font-weight: 700; }
.form-message.error { padding-left: 10px; border-left: 4px solid var(--black); }

.files-heading { display: flex; align-items: baseline; justify-content: space-between; }
.files-heading span { color: var(--grey-600); font-size: 14px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 10px; border-bottom: 1px solid var(--grey-300); text-align: left; color: var(--grey-600); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
td { padding: 18px 10px; border-bottom: 1px solid var(--grey-300); vertical-align: middle; }
.file-name { min-width: 190px; font-weight: 850; overflow-wrap: anywhere; }
.muted, td .muted { margin-top: 4px; color: var(--grey-600); font-size: 13px; }
.download { font-weight: 850; text-underline-offset: 4px; }
.list-pagination { align-items: center; display: grid; grid-template-columns: 1fr auto 1fr; margin-top: 18px; }
.list-pagination > :last-child { justify-self: end; }
.list-pagination > span { color: var(--muted); font-size: 13px; }
.action-cell { text-align: right; }
.empty { padding: 40px; text-align: center; color: var(--grey-600); }
.download-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; color: var(--grey-600); font-size: 13px; }
.download-breadcrumb a { color: var(--black); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.delete-link { color: var(--black); text-decoration: underline; text-underline-offset: 4px; }
.upload-history-list { border-top: 1px solid var(--grey-300); }
.upload-history-item { padding: 18px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--grey-300); }
.upload-history-copy { min-width: 0; }
.upload-history-name { display: block; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.upload-history-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; color: var(--grey-600); font-size: 13px; line-height: 1.45; }
.upload-history-meta span { display: inline-flex; gap: 6px; }
.upload-history-meta b { color: var(--black); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.history-delete-form { flex: 0 0 auto; margin: 0; }
.history-delete { min-width: 78px; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.connection { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 22px; border: 1px solid var(--grey-300); border-radius: 8px; background: var(--off-white); }
.connection-dot { width: 10px; height: 10px; border: 1px solid var(--black); border-radius: 50%; background: var(--white); }
.connection-dot.online { background: var(--black); }
.connection small, .person small, .team-list small { display: block; margin-top: 4px; color: var(--grey-600); }
.stack-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.admin-card > h2:first-child { margin-top: 0; }
.admin-card > .stack-form { margin-top: 24px; }
.picker-help { max-width: 560px; margin-bottom: 14px; line-height: 1.5; }
.stack-form label { margin: 0; }
.team-list { margin: 30px 0 0; padding: 0; list-style: none; }
.team-list li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--grey-300); font-size: 12px; }
.team-list small { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.team-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.team-actions a { font-weight: 850; text-underline-offset: 3px; }
.folder-bindings { display: flex; gap: 8px; margin-left: auto; }
.folder-binding { padding: 7px 10px; border: 1px solid var(--grey-300); border-radius: 6px; font-size: 11px; font-weight: 700; text-decoration: none; }
.folder-binding.bound { background: var(--black); color: var(--white); }
.users-card { margin-top: 26px; }
.person { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--black); border-radius: 50%; background: var(--black); color: var(--white); font-weight: 900; }
.status { padding: 5px 9px; border: 1px solid var(--black); border-radius: 20px; background: var(--white); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.status.approved { background: var(--black); color: var(--white); }
.status.pending { background: var(--grey-100); }
.status.blocked { background: repeating-linear-gradient(-45deg, var(--white), var(--white) 3px, var(--grey-300) 3px, var(--grey-300) 6px); }
.approval-form { display: grid; grid-template-columns: minmax(125px, 1fr) 105px minmax(145px, auto); gap: 8px; align-items: center; }
.approval-form select { margin: 0; padding: 9px; }
.sync-action { display: grid; gap: 6px; }
.drive-access { color: var(--grey-600); font-size: 10px; font-weight: 900; }
.drive-access.synced { color: var(--black); }

.resources-page .page-header { margin-bottom: 12px; }
.resources-header h1 { margin-top: 0; }
.resource-intro { max-width: 680px; margin: 0 0 42px; color: var(--grey-600); line-height: 1.65; }
.resource-section { margin-top: 38px; }
.resource-category { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--black); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.resource-category-actions { display: flex; align-items: center; gap: 14px; }
.tools-download-all { font-size: 12px; font-weight: 850; letter-spacing: .02em; text-decoration: underline; text-underline-offset: 4px; text-transform: none; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.resource-card { min-height: 230px; padding: 24px; display: flex; flex-direction: column; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.resource-card:hover { transform: translateY(-2px); border-color: var(--black); }
.resource-card h2 { margin: 16px 0 12px; font-family: inherit; font-size: 22px; font-weight: 850; }
.resource-card p { margin: 0; color: var(--grey-600); line-height: 1.6; }
.resource-type { font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.resource-open { margin-top: auto; padding-top: 24px; font-size: 12px; font-weight: 850; }
.resource-list { border-top: 1px solid var(--grey-300); }
.resource-list-item { min-height: 76px; padding: 16px 8px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--grey-300); text-decoration: none; }
.resource-list-item:hover { background: var(--off-white); }
.resource-list-copy { min-width: 0; display: grid; gap: 7px; }
.resource-list-copy strong { font-size: 17px; overflow-wrap: anywhere; }
.resource-list-copy span { color: var(--grey-600); font-size: 13px; }
.resource-list-copy .resource-kind { display: inline-block; margin-right: 10px; padding: 3px 6px; border: 1px solid var(--grey-300); color: var(--black); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; }
.resource-list-action { flex: 0 0 auto; font-size: 13px; font-weight: 850; }
.resource-tree { margin-top: 16px; border-top: 1px solid var(--grey-300); }
.resource-folder { position: relative; border-bottom: 1px solid var(--grey-300); }
.resource-folder > summary { min-height: 64px; padding: 14px 120px 14px 8px; display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 850; list-style: none; }
.resource-folder > summary::-webkit-details-marker { display: none; }
.resource-folder > summary::before { content: "+"; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--grey-300); border-radius: 50%; font-size: 14px; font-weight: 700; }
.resource-folder[open] > summary::before { content: "−"; }
.resource-folder-name { min-width: 0; overflow-wrap: anywhere; }
.resource-folder-download { position: absolute; top: 21px; right: 8px; z-index: 1; font-size: 12px; font-weight: 850; text-decoration: underline; text-underline-offset: 4px; }
.resource-folder-contents { margin-left: 28px; padding-left: 18px; border-left: 1px solid var(--grey-300); }
.resource-folder-contents > .resource-list-item:last-child { border-bottom: 0; }
.resource-folder-empty { padding: 18px 8px; color: var(--grey-600); font-size: 13px; }
.resource-warning { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.resource-warning .button { flex: 0 0 auto; }
.resource-sync-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.resource-sync-actions form { margin: 0; }
.resource-empty { margin-top: 30px; }
.resources-admin-card { margin-top: 26px; }

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .identity-stage { min-height: 500px; margin: 0 32px 48px; border: 1px solid var(--grey-300); }
  .workspace-grid, .admin-grid, .direct-drive-grid, .resource-grid { grid-template-columns: 1fr; }
  .stack-form { grid-template-columns: 1fr; }
  .page-header { display: block; }
  .date-chip { display: inline-block; min-width: auto; margin-top: 22px; }
}

@media (max-width: 1100px) {
  .user-email { display: none; }
}

@media (max-width: 820px) {
  .team-list li { align-items: flex-start; flex-wrap: wrap; }
  .folder-bindings { margin-left: 0; }
}

@media (max-width: 640px) {
  .nav { min-height: 70px; padding: 14px 18px; align-items: flex-start; flex-wrap: wrap; }
  .brand { gap: 10px; }
  .brand img { width: 118px; height: 30px; }
  .brand span { padding-left: 10px; font-size: 11px; }
  .primary-nav { order: 3; width: 100%; height: 38px; margin-left: 0; gap: 22px; }
  .nav-actions { flex-wrap: wrap; justify-content: flex-end; gap: 9px 13px; }
  .user-email { width: 100%; text-align: right; }
  .hero-copy { min-height: 560px; padding: 64px 22px; }
  .identity-stage { min-height: 420px; padding: 24px 20px; }
  .stage-footer span:last-child { display: none; }
  .page-section { padding: 42px 16px 72px; }
  .page-header { display: block; }
  .date-chip { display: inline-block; margin-top: 20px; }
  .upload-card, .files-card, .admin-card, .drive-action-card { padding: 20px; }
  .upload-history-item { flex-direction: column; }
  .history-delete-form, .history-delete { width: 100%; }
  .approval-form { min-width: 390px; }
  .card { box-shadow: none; }
}

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