@font-face {
  font-family: "Inter";
  src: url("/assets/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/inter-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #000000;
  --surface: #0a0a0a;
  --surface-raised: #101010;
  --text: #ffffff;
  --muted: #b8b8b8;
  --faint: #6a6a6a;
  --line: #1e1e1e;
  --accent: #4ade80;
  --accent-hover: #3ec96f;
  font-family: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-size: 18px;
  line-height: 1.55;
}
button, input, textarea { font: inherit; }
button, input, textarea { border-radius: 3px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
h1 { margin: 0; font-size: clamp(36px, 6vw, 72px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; }
h1 span { color: var(--muted); }
label { display: block; margin-bottom: 9px; color: var(--text); font-size: 15px; font-weight: 600; }
label span { color: var(--faint); font-weight: 400; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  caret-color: var(--accent);
  transition: border-color 150ms ease, background 150ms ease;
}
input:hover, textarea:hover { border-color: #2f2f2f; }
input:focus, textarea:focus { border-color: var(--accent); background: var(--surface-raised); outline: none; }
input { min-height: 56px; padding: 14px 16px; }
textarea { min-height: clamp(320px, 48vh, 620px); padding: 22px; resize: vertical; line-height: 1.65; }
textarea::placeholder, input::placeholder { color: var(--faint); }

.button {
  min-height: 56px;
  padding: 15px 28px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.button:disabled { cursor: wait; opacity: .7; }
.primary { background: var(--accent); color: #000000; }
.primary:hover { background: var(--accent-hover); }
.primary:active { background: #31ac5b; }
.secondary { border-color: var(--line); background: transparent; color: var(--muted); }
.secondary:hover { border-color: #3a3a3a; color: var(--text); }
.secondary:active { background: var(--surface-raised); }
.status { min-height: 28px; margin: 14px 0 0; color: var(--muted); font-size: 16px; }

.login-page { display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(100%, 480px); }
.login-card { border: 1px solid var(--line); background: var(--surface); padding: clamp(28px, 7vw, 52px); }
.login-card h1 { font-size: clamp(38px, 10vw, 58px); }
.intro { margin: 18px 0 36px; color: var(--muted); }
.login-card label:not(:first-of-type) { margin-top: 18px; }
.login-card .button { width: 100%; margin-top: 28px; }
.login-card .status { color: #ff8f82; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--accent); font-size: 16px; font-weight: 800; letter-spacing: .14em; text-decoration: none; }
.text-button { min-width: 56px; min-height: 44px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.text-button:hover { color: var(--text); }
.app-shell { width: min(100%, 1280px); margin: 0 auto; padding: clamp(48px, 7vw, 92px) clamp(24px, 5vw, 64px) 64px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; margin-bottom: 56px; }
.privacy { max-width: 390px; margin: 0 0 5px; padding-left: 18px; border-left: 3px solid var(--accent); color: var(--muted); font-size: 16px; }
.editor-block { position: relative; }
.counter { margin: 10px 0 0; color: var(--faint); font-size: 15px; }
.action-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 32px; margin-top: 30px; }
.filename-input { display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 3px; }
.filename-input:focus-within { border-color: var(--accent); background: var(--surface-raised); }
.filename-input input { border: 0; background: transparent; }
.filename-input input:focus { background: transparent; }
.filename-input span { padding: 0 16px 0 10px; color: var(--faint); font-size: 16px; }
.buttons { display: flex; gap: 12px; }

@media (max-width: 760px) {
  .topbar { height: 64px; }
  .app-shell { padding-top: 48px; padding-bottom: 40px; }
  .hero-row { display: block; margin-bottom: 40px; }
  .privacy { margin-top: 30px; }
  h1 { font-size: clamp(38px, 11.5vw, 52px); }
  textarea { min-height: 380px; padding: 18px; }
  .action-row { grid-template-columns: 1fr; gap: 24px; }
  .buttons { display: grid; grid-template-columns: 1fr 1.35fr; }
  .button { width: 100%; padding-inline: 16px; }
}

@media (max-width: 420px) {
  .buttons { grid-template-columns: 1fr; }
  .buttons .primary { grid-row: 1; }
  .buttons .secondary { grid-row: 2; }
}

