:root {
  color-scheme: light;
  --ink: #17241d;
  --muted: #647169;
  --paper: #f4f1e9;
  --surface: #fbfaf4;
  --forest: #244c3c;
  --forest-dark: #19392d;
  --rust: #b94d32;
  --line: #d6d9d0;
  --success: #286346;
  --error: #a53d2a;
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  background-color: #15241b;
  background-image:
    linear-gradient(90deg, rgba(9, 18, 14, 0.82), rgba(9, 18, 14, 0.48) 55%, rgba(9, 18, 14, 0.3)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2000&q=85");
  background-position: center;
  background-size: cover;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 clamp(1.25rem, 5vw, 4.5rem);
  color: #fffefa;
  background: rgba(15, 32, 24, 0.42);
  border-bottom: 1px solid rgba(255, 253, 247, 0.2);
  backdrop-filter: blur(12px);
}

.brand { color: inherit; font-weight: 700; text-decoration: none; }
.service-name { color: #e0e6dc; font-size: 0.9rem; }
.secure-label { margin-left: auto; color: #e0e6dc; font-size: 0.78rem; }

.layout {
  flex: 1;
  width: min(1220px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 4rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 5rem;
  align-items: center;
}

.intro { max-width: 590px; animation: appear 450ms ease-out both; }
.eyebrow { margin: 0 0 1.25rem; color: #f1b39d; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; }
h1 { max-width: 9ch; margin: 0; color: #fffdf7; font-family: "Palatino Linotype", Palatino, Georgia, serif; font-size: 5rem; font-weight: 400; line-height: 0.98; }
.intro-copy { max-width: 38ch; margin: 1.6rem 0 0; color: rgba(255, 253, 247, 0.88); font-family: "Palatino Linotype", Palatino, Georgia, serif; font-size: 1.2rem; line-height: 1.55; }

.workspace { width: min(100%, 520px); min-width: 0; justify-self: end; animation: appear 550ms 80ms ease-out both; }
.login-panel, .browser-panel, .upload-panel { padding: 2rem; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.72); border-top: 4px solid var(--rust); box-shadow: 0 20px 56px rgba(0, 0, 0, 0.24); }
h2 { margin: 0; font-size: 1.2rem; }
.login-panel h2 { margin-bottom: 1.5rem; }
label:not(.secondary-button) { display: block; margin: 1rem 0 0.4rem; color: #46534c; font-size: 0.84rem; font-weight: 700; }
input:not([type="file"]) { width: 100%; min-height: 46px; padding: 0.65rem 0.75rem; border: 1px solid #aeb8af; border-radius: 2px; color: var(--ink); background: #fff; font: inherit; }
input:not([type="file"]):focus-visible, button:focus-visible, .drop-zone:focus-visible, .secondary-button:focus-visible { outline: 3px solid #dc8b66; outline-offset: 2px; }

.primary-button, .secondary-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1rem; border: 0; border-radius: 2px; font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: background-color 140ms ease, transform 140ms ease; }
.primary-button { color: white; background: var(--forest); }
.primary-button:hover:not(:disabled) { background: var(--forest-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.5; }
.login-panel .primary-button { width: 100%; margin-top: 1.5rem; }
.secondary-button { color: var(--forest-dark); background: #e6ebe3; }
.secondary-button:hover { background: #d8e1d7; }
.text-button { padding: 0.45rem 0; border: 0; color: var(--rust); background: transparent; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.text-button:disabled { cursor: default; opacity: 0.45; }

.panel-heading, .queue-heading, .upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel-heading { margin-bottom: 1.4rem; }
#signed-in-as { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.82rem; }
.panel-subtitle { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.82rem; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; min-height: 2rem; margin-bottom: 0.65rem; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.breadcrumb-item { padding: 0; border: 0; color: var(--forest); background: transparent; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.breadcrumb-item:hover { color: var(--rust); text-decoration: underline; }
.breadcrumb-separator { color: #9aa49b; }
.browser-message { margin: 0 0 0.55rem; }
.browser-list { max-height: 340px; margin: 0; padding: 0; overflow: auto; list-style: none; border-top: 1px solid var(--line); }
.browser-item { border-bottom: 1px solid var(--line); }
.browser-entry { width: 100%; min-height: 48px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; padding: 0.55rem 0.25rem; border: 0; color: var(--ink); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.browser-entry:hover { background: #f0f3ec; }
.browser-kind { color: var(--muted); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.browser-kind.folder { color: var(--forest); }
.browser-name { min-width: 0; overflow-wrap: anywhere; font-size: 0.84rem; }
.browser-detail { color: var(--muted); font-size: 0.73rem; white-space: nowrap; }
.drop-zone { min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 1rem; text-align: center; border: 1px dashed #7e9b88; background: #f1f4ec; transition: background-color 140ms ease, border-color 140ms ease; }
.drop-zone.is-over { border-color: var(--rust); background: #fff1e9; }
.drop-title { margin: 0; font-weight: 700; }
.drop-hint { margin: 0.55rem 0 1.25rem; color: var(--muted); font-size: 0.82rem; }
.pickers { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.65rem; }
.queue-heading { margin: 1.7rem 0 0.6rem; }
.queue-heading h3 { margin: 0; font-size: 0.92rem; }
.file-list { max-height: 260px; margin: 0; padding: 0; overflow: auto; list-style: none; border-top: 1px solid var(--line); }
.file-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.8rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.file-name { overflow-wrap: anywhere; }
.file-size, .file-state { color: var(--muted); font-size: 0.74rem; }
.file-state.done { color: var(--success); }
.file-state.failed { color: var(--error); }
.upload-footer { align-items: end; margin-top: 1rem; }
.message { min-height: 1.2em; margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.message.error { color: var(--error); }
.message.success { color: var(--success); }
[hidden] { display: none !important; }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem clamp(1.25rem, 5vw, 4.5rem); color: rgba(255, 253, 247, 0.78); border-top: 1px solid rgba(255, 253, 247, 0.22); background: rgba(15, 32, 24, 0.32); font-size: 0.75rem; }

@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 760px) {
  .layout { width: min(620px, calc(100% - 2.5rem)); grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 3rem 0; }
  .intro { max-width: 520px; }
  h1 { max-width: 12ch; font-size: 3.75rem; }
  .intro-copy { margin-top: 1rem; }
  .workspace { justify-self: center; }
}

@media (max-width: 480px) {
  .topbar { min-height: 60px; flex-wrap: wrap; gap: 0.35rem 0.8rem; padding-block: 0.75rem; }
  .service-name { font-size: 0.78rem; }
  .secure-label { width: 100%; margin-left: 0; font-size: 0.72rem; }
  .layout { width: calc(100% - 1.5rem); }
  h1 { font-size: 3.25rem; }
  .login-panel, .browser-panel, .upload-panel { padding: 1.25rem; }
  footer { flex-direction: column; }
  .upload-footer { align-items: stretch; flex-direction: column; }
  .browser-entry { grid-template-columns: 44px minmax(0, 1fr); gap: 0.35rem 0.5rem; }
  .browser-detail { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}