
:root {
  --prussian: #003153;
  --prussian-deep: #001f35;
  --black: #080b0e;
  --white: #ffffff;
  --paper: #f5f7f9;
  --line: #dce2e8;
  --muted: #65717c;
  --soft-blue: #e9f0f5;
  --radius: 5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button, textarea { font: inherit; }
button { cursor: pointer; }

button:focus-visible,
textarea:focus-visible {
  outline: 3px solid #6b9cc0;
  outline-offset: 3px;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: var(--prussian);
  color: var(--white);
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
  padding: 3px 2px 36px;
}

.brand-logo-wrap {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: #fff;
  padding: 3px;
  flex: 0 0 52px;
}

.brand-logo-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.brand-name small {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  margin-top: 5px;
  font-weight: 600;
  color: #c8d9e6;
}

.nav { display: grid; gap: 7px; }

.nav-link {
  border: 0;
  border-radius: var(--radius);
  padding: 13px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #d2e0ea;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, .12);
  color: white;
}

.nav-link.active { box-shadow: inset 3px 0 white; }
.nav-icon { width: 19px; font-size: 19px; text-align: center; }

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding-top: 18px;
}

.status-line {
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #e0eaf1;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: white;
  border-radius: 50%;
  margin-right: 7px;
}

.sidebar-bottom p {
  font-size: 12px;
  color: #b8cddd;
  line-height: 1.5;
}

.main {
  min-width: 0;
  padding: 0 5.2%;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.crumb {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 800;
}

.crumb span { color: var(--prussian); padding: 0 8px; }

.sign-in {
  border: 1px solid var(--prussian);
  background: transparent;
  color: var(--prussian);
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 750;
}

.sign-in span { margin-left: 12px; font-size: 16px; }

.sign-in:hover,
.outline-button:hover {
  background: var(--prussian);
  color: white;
}

.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  color: var(--prussian);
  font-size: 22px;
}

.view {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.hero {
  background: var(--prussian);
  color: white;
  margin-top: 28px;
  padding: clamp(28px, 5vw, 58px);
  min-height: 315px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  right: -70px;
  top: -80px;
  box-shadow: 0 0 0 32px rgba(255, 255, 255, .025),
              0 0 0 66px rgba(255, 255, 255, .025);
}

.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--prussian);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.8px;
}

.hero .eyebrow { color: #d5e4ee; }
.eyebrow-rule { width: 23px; height: 2px; background: white; display: inline-block; }

.hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(42px, 6.3vw, 76px);
  line-height: .92;
  letter-spacing: -4px;
  margin: 25px 0 18px;
  font-weight: 950;
}

.hero h1 span { color: #c6d9e7; }

.hero-copy {
  max-width: 380px;
  color: #e0e9ef;
  font-size: 14px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 29px;
  color: #d3e1eb;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.meta-number { color: white; font-size: 12px; }
.meta-rule { width: 35px; height: 1px; background: #9bb9cd; }

.hero-stamp {
  position: absolute;
  z-index: 1;
  right: 9%;
  bottom: 44px;
  border: 1px solid rgba(255, 255, 255, .45);
  width: 85px;
  height: 85px;
  display: grid;
  place-content: center;
  text-align: center;
  font-weight: 950;
  font-size: 29px;
  line-height: .8;
  transform: rotate(8deg);
}

.hero-stamp span {
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 10px;
}

.workspace-heading,
.output-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 38px 0 18px;
}

.workspace-heading h2,
.output-title h2 {
  margin: 8px 0 0;
  font-size: 23px;
  letter-spacing: -.8px;
}

.draft-label,
.preview-tag {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
  white-space: nowrap;
}

.draft-label b { color: var(--prussian); font-size: 15px; padding-left: 8px; }

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.mode-tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  text-align: left;
  padding: 16px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mode-tab span { margin-right: 11px; font-size: 10px; color: #8995a0; }
.mode-tab.selected { color: var(--prussian); border-bottom-color: var(--prussian); }
.mode-tab.selected span { color: var(--prussian); }

.creator-card {
  background: white;
  border: 1px solid var(--line);
  border-top: 0;
  padding: clamp(20px, 3vw, 32px);
}

.field-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--prussian);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
  margin-bottom: 13px;
}

.field-label span {
  color: #8995a0;
  font-size: 9px;
  font-weight: 700;
  text-align: right;
}

textarea {
  display: block;
  width: 100%;
  min-height: 130px;
  border: 1px solid #d8e0e7;
  border-radius: 3px;
  padding: 17px;
  resize: vertical;
  color: var(--black);
  background: #fbfcfd;
  font-size: 14px;
  line-height: 1.6;
}

textarea::placeholder { color: #98a3ad; }

.input-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0 19px;
  color: #8b96a0;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .7px;
}

.form-bottom {
  border-top: 1px solid #e7ebef;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.format-select { display: flex; gap: 11px; align-items: center; }

.format-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 39px;
  border: 1px solid #c6d2dc;
  color: var(--prussian);
  font-size: 24px;
}

.format-select b,
.format-select small { display: block; }

.format-select b { color: var(--prussian); font-size: 9px; letter-spacing: 1px; }
.format-select small { color: #7e8993; font-size: 9px; margin-top: 5px; }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  border: 1px solid var(--prussian);
  background: var(--prussian);
  color: white;
  padding: 14px 19px;
  font-size: 12px;
  font-weight: 800;
  transition: background .15s, color .15s;
}

.primary-button:hover { background: var(--prussian-deep); }
.primary-button span { font-size: 17px; }

.inline-notice {
  color: var(--prussian);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 13px;
}

.upload-zone {
  border: 1px dashed #a8bac8;
  background: #f7fafc;
  padding: 20px;
  margin: 3px 0 18px;
}

.upload-zone p { font-size: 12px; color: var(--muted); line-height: 1.6; }

.upload-button {
  background: white;
  color: var(--prussian);
  border: 1px solid var(--prussian);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
}

.file-list { display: flex; flex-wrap: wrap; gap: 7px; }

.file-chip {
  background: var(--soft-blue);
  color: var(--prussian);
  padding: 6px 8px;
  font-size: 11px;
}

.output-section { margin: 37px 0 48px; }
.output-title { margin: 0 0 17px; }

.empty-project,
.project-result {
  border: 1px solid var(--line);
  background: white;
  padding: 21px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.empty-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  background: var(--soft-blue);
  color: var(--prussian);
  font-size: 23px;
}

.empty-project h3,
.project-result h3 {
  font-size: 14px;
  margin: 0 0 6px;
}

.empty-project p,
.project-info p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.empty-index { margin-left: auto; color: #9aa6af; font-size: 12px; font-weight: 800; }

.project-thumb {
  background: var(--prussian);
  color: white;
  width: 65px;
  min-width: 65px;
  height: 88px;
  display: grid;
  align-content: center;
  justify-content: center;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
}

.project-thumb small { font-size: 7px; letter-spacing: 1px; margin-top: 7px; }

.project-info { flex: 1; min-width: 0; }

.project-status {
  display: block;
  font-size: 8px;
  font-weight: 900;
  color: var(--prussian);
  letter-spacing: 1.1px;
  margin-bottom: 7px;
}

.project-info small { display: block; margin-top: 9px; font-size: 10px; color: #8b96a0; }

.outline-button {
  background: white;
  border: 1px solid var(--prussian);
  color: var(--prussian);
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 800;
}

.page-heading {
  padding: 58px 0 28px;
  border-bottom: 1px solid var(--line);
}

.page-heading h1 {
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: -3px;
  margin: 17px 0 10px;
  color: var(--prussian);
  line-height: .95;
}

.page-heading h1 span { color: var(--black); }
.page-heading p { color: var(--muted); font-size: 14px; }
.projects-list { margin: 25px 0; }

.account-panel {
  margin: 30px 0;
  background: white;
  border: 1px solid var(--line);
  padding: clamp(22px, 4vw, 40px);
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.account-monogram {
  display: grid;
  place-items: center;
  flex: 0 0 75px;
  height: 75px;
  background: var(--prussian);
  color: white;
  font-size: 23px;
  font-weight: 950;
}

.account-panel h2 { font-size: 23px; margin: 12px 0; }

.account-panel p {
  max-width: 510px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.footer {
  border-top: 1px solid var(--line);
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #87929b;
  font-size: 8px;
  letter-spacing: 1.1px;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(0, 18, 31, .72);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal {
  position: relative;
  width: min(100%, 410px);
  background: white;
  padding: 34px;
  border-top: 5px solid var(--prussian);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 13px;
  border: 0;
  background: transparent;
  font-size: 27px;
  color: var(--prussian);
}

.modal-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--prussian);
  color: white;
  font-weight: 950;
  margin-bottom: 24px;
}

.modal h2 {
  font-size: 31px;
  line-height: 1.05;
  letter-spacing: -1px;
  margin: 12px 0;
  color: var(--prussian);
}

.modal p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 25px;
}

.full-width { width: 100%; }
.hidden { display: none !important; }

/* Gemini caption tools */
.caption-tools {
  border-top: 1px solid #e7ebef;
  padding-top: 22px;
  margin-top: 4px;
}

.caption-input {
  display: block;
  width: 100%;
  min-height: 110px;
  margin-bottom: 12px;
}

.caption-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.caption-actions button {
  background: var(--prussian);
  color: var(--white);
  border: 1px solid var(--prussian);
  padding: 12px 15px;
  font-size: 12px;
  font-weight: 800;
}

.caption-actions button:hover { background: var(--prussian-deep); }

.caption-actions button:disabled {
  opacity: .6;
  cursor: wait;
}

#captionStatus {
  color: var(--prussian);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 850px) {
  .layout { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding: 23px 15px; }
  .main { padding: 0 4%; }
  .hero-stamp { right: 5%; opacity: .6; }
}

@media (max-width: 650px) {
  .layout { display: block; }

  .sidebar {
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 250px;
    transform: translateX(-105%);
    transition: transform .2s;
    box-shadow: 15px 0 35px rgba(0, 0, 0, .18);
  }

  .sidebar.open { transform: translateX(0); }
  .main { padding: 0 18px; }
  .topbar { height: 65px; gap: 12px; }
  .mobile-menu { display: block; }
  .crumb { margin-right: auto; font-size: 8px; letter-spacing: 1px; }
  .sign-in { padding: 9px 10px; font-size: 11px; }
  .hero { margin-top: 18px; min-height: 300px; padding: 29px 24px; }
  .hero h1 { letter-spacing: -2.5px; }

  .hero-stamp {
    width: 60px;
    height: 60px;
    font-size: 21px;
    right: 24px;
    bottom: 24px;
  }

  .hero-stamp span { font-size: 6px; }
  .workspace-heading { align-items: flex-start; }

  .workspace-heading h2,
  .output-title h2 { font-size: 20px; }

  .draft-label { font-size: 8px; padding-top: 3px; }
  .mode-tab { padding: 14px 7px; font-size: 11px; }
  .mode-tab span { margin-right: 5px; }

  .field-label { display: block; line-height: 1.8; }
  .field-label span { display: block; text-align: left; }

  .form-bottom { align-items: stretch; flex-direction: column; }
  .primary-button { width: 100%; }

  .empty-project,
  .project-result { align-items: flex-start; gap: 12px; padding: 15px; }

  .empty-index { display: none; }
  .project-result { flex-wrap: wrap; }
  .project-info { min-width: calc(100% - 80px); }

  .footer {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 17px 0;
    line-height: 1.5;
  }

  .footer span:last-child { display: none; }
  .account-panel { flex-direction: column; }

  .caption-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .caption-actions button { width: 100%; }
}
