:root {
  --paper: #f2f0e9;
  --paper-2: #e8e5dc;
  --ink: #18312d;
  --muted: #65726e;
  --line: rgba(24, 49, 45, 0.16);
  --forest: #204f46;
  --forest-dark: #163d36;
  --mint: #c8dcd2;
  --coral: #e1765e;
  --coral-soft: #f1d3ca;
  --white: #fbfaf6;
  --shadow: 0 18px 55px rgba(27, 43, 39, 0.09);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.hidden { display: none !important; }
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 20;
  background-image:
    radial-gradient(circle at 20% 30%, currentColor 0 .45px, transparent .6px),
    radial-gradient(circle at 70% 65%, currentColor 0 .35px, transparent .55px);
  background-size: 7px 7px, 9px 9px;
}

.topbar {
  height: 76px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 240, 233, .88);
  backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 50px; height: 38px; display: inline-flex; align-items: flex-end; gap: 4px; }
.brand-mark span { display: block; background: var(--forest); border-radius: 4px 4px 1px 1px; transform: skewY(-28deg); }
.brand-mark span:first-child { width: 20px; height: 24px; }
.brand-mark span:last-child { width: 20px; height: 35px; background: var(--coral); }
.brand-mark.small { width: 28px; height: 25px; gap: 2px; }
.brand-mark.small span:first-child { width: 12px; height: 16px; }
.brand-mark.small span:last-child { width: 12px; height: 24px; }
nav { display: flex; gap: 32px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
nav a:hover { color: var(--ink); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 16px; }
.status-pill { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #bc8d38; box-shadow: 0 0 0 4px rgba(188, 141, 56, .12); }
.status-pill.ready i { background: #4f8d65; box-shadow: 0 0 0 4px rgba(79, 141, 101, .13); }
.quiet-button { border: 0; background: none; padding: 8px; cursor: pointer; color: var(--muted); font-size: 13px; }

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.4fr .6fr; align-items: end; gap: 80px; padding: 96px 0 80px; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .15em; font-size: 11px; font-weight: 800; color: var(--coral); }
.hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(54px, 7.2vw, 96px); font-weight: 500; letter-spacing: -.055em; line-height: .92; }
.hero h1 em { color: var(--forest); font-weight: 400; }
.hero-copy { color: var(--muted); font-size: 17px; max-width: 380px; margin: 0 0 8px; }

.attention-banner { margin-bottom: 40px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid rgba(225, 118, 94, .38); background: rgba(241, 211, 202, .45); border-radius: 16px; }
.attention-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: white; font-weight: 800; }
.attention-banner strong, .attention-banner span { display: block; }
.attention-banner span { font-size: 13px; color: var(--muted); }
.attention-banner a { color: var(--ink); font-weight: 750; font-size: 13px; }

.section-block { padding: 86px 0; border-top: 1px solid var(--line); }
.transfer-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 22px; }
.wide-heading { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.section-heading h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.035em; font-weight: 500; font-size: clamp(38px, 4vw, 56px); line-height: 1; margin: 0; }
.section-heading > p, .wide-heading > p { max-width: 420px; color: var(--muted); margin: 0; }
.step-number { float: left; margin-right: 18px; color: var(--coral); font-family: Georgia, serif; font-style: italic; }
.panel { background: rgba(251, 250, 246, .78); border: 1px solid rgba(24, 49, 45, .1); border-radius: var(--radius); box-shadow: var(--shadow); }
.route-panel { min-height: 380px; display: grid; grid-template-columns: 1fr 72px 1fr; overflow: hidden; }
.route-half { padding: 34px; }
.target-half { background: rgba(200, 220, 210, .25); }
.route-connector { display: grid; place-items: center; position: relative; }
.route-connector::before { content: ""; position: absolute; height: 100%; width: 1px; background: var(--line); left: 50%; }
.route-connector span { z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); border-radius: 50%; color: var(--coral); font-size: 20px; }
.service-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 32px; }
.service-heading small, .setup-status-row small { color: var(--muted); display: block; font-size: 11px; }
.service-heading h3 { margin: -1px 0 0; font-size: 17px; }
.service-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 10px; font-size: 14px; font-weight: 850; }
.service-icon.onedrive { color: #1259a7; background: #dceaf9; }
.service-icon.gphotos { color: #bd624c; background: var(--coral-soft); }
label { display: block; font-size: 12px; font-weight: 750; margin-bottom: 7px; }
input, select, .folder-field { width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.55); border-radius: 11px; min-height: 47px; padding: 0 13px; color: var(--ink); outline: none; margin-bottom: 22px; }
input:focus, select:focus, .folder-field:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(32, 79, 70, .09); }
.folder-field { display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; }
.folder-field:disabled { opacity: .6; cursor: not-allowed; }
.folder-field span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.folder-field b { color: var(--coral); font-size: 12px; margin-left: 8px; }
.options-panel { padding: 34px; }
.panel-title-row { display: flex; align-items: start; justify-content: space-between; margin-bottom: 25px; }
.panel-title-row h3 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.safe-badge { background: var(--mint); color: var(--forest-dark); border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.segmented { padding: 4px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 13px; gap: 3px; margin-bottom: 22px; }
.segmented button { border: 0; background: transparent; padding: 11px 8px; border-radius: 9px; cursor: pointer; text-align: left; }
.segmented button span, .segmented button small { display: block; }
.segmented button span { font-size: 13px; font-weight: 800; }
.segmented button small { color: var(--muted); font-size: 10px; }
.segmented button.active { background: var(--forest); color: white; }
.segmented button.active small { color: rgba(255,255,255,.7); }
.check-row { display: flex; align-items: center; gap: 11px; padding: 15px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row input { width: 18px; min-height: 18px; height: 18px; margin: 0; accent-color: var(--forest); }
.check-row span b, .check-row span small { display: block; }
.check-row span b { font-size: 13px; }
.check-row span small { color: var(--muted); font-weight: 500; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 16px 0; font-size: 12px; font-weight: 750; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.details-grid input { margin-top: 5px; margin-bottom: 16px; }
.primary-button, .secondary-button, .danger-button { border-radius: 12px; min-height: 48px; padding: 0 16px; font-weight: 750; font-size: 13px; cursor: pointer; }
.primary-button { border: 0; background: var(--forest); color: white; display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 22px; }
.primary-button:hover { background: var(--forest-dark); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.secondary-button { border: 1px solid var(--line); background: var(--white); }
.danger-button { border: 1px solid rgba(198, 80, 57, .3); background: var(--coral-soft); color: #8f3f30; }
.full { width: 100%; }
.form-error, .form-message { color: #a34c3a; font-size: 12px; min-height: 17px; }
.form-message.success { color: #397051; }

.active-section { margin: 20px 0 70px; padding: 34px; border-radius: var(--radius); background: var(--forest); color: white; box-shadow: 0 24px 70px rgba(20, 59, 52, .22); }
.active-header { display: flex; justify-content: space-between; align-items: start; }
.active-header .eyebrow { color: #a8d1c4; }
.active-header h2 { margin: 0; font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.job-status { border-radius: 999px; padding: 6px 10px; background: rgba(255,255,255,.11); font-size: 11px; font-weight: 800; }
.job-status.running::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #80c99c; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
.progress-track { height: 9px; margin: 34px 0 16px; background: rgba(255,255,255,.13); border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--coral); border-radius: inherit; transition: width .5s ease; }
.progress-meta { display: grid; grid-template-columns: auto 1fr auto auto; gap: 22px; align-items: center; color: rgba(255,255,255,.68); font-size: 12px; }
.progress-meta strong { color: white; font-size: 24px; }
.active-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; }
.active-section .secondary-button { background: transparent; color: white; border-color: rgba(255,255,255,.25); }
.log-view { margin-top: 18px; padding: 16px; background: rgba(0,0,0,.18); border-radius: 11px; max-height: 260px; overflow: auto; font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d9e8e3; }
.log-line.error { color: #ffc4b7; }

.setup-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(50px, 9vw, 130px); align-items: center; }
.setup-grid .section-heading > p { margin: 25px 0 0 40px; }
.setup-panel { padding: 34px; }
.setup-panel-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 18px; }
.setup-panel-heading h3 { margin: 0; font: 500 30px/1 Georgia, serif; }
.setup-status-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.setup-status-row > div { display: flex; align-items: center; gap: 12px; }
.connection-state { font-size: 11px; font-weight: 750; color: var(--muted); }
.connection-state.connected { color: #397051; }
.connection-state.connected::before { content: "✓ "; }
.setup-divider { height: 1px; background: var(--line); margin: 14px 0 24px; }
.setup-roadmap { margin: 34px 0 0 40px; border-left: 1px solid var(--line); }
.setup-roadmap > div { position: relative; display: flex; gap: 12px; align-items: center; min-height: 62px; padding-left: 25px; color: var(--muted); }
.setup-roadmap i { position: absolute; left: -15px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font: 700 11px/1 Inter, sans-serif; }
.setup-roadmap span b, .setup-roadmap span small { display: block; }
.setup-roadmap span b { color: var(--ink); font-size: 13px; }
.setup-roadmap span small { font-size: 11px; }
.setup-roadmap .done i { border-color: var(--forest); background: var(--forest); color: white; }
.setup-roadmap .done i::before { content: "✓"; }
.setup-roadmap .done i { font-size: 0; }
.service-setup-actions { margin: 0 0 16px 50px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.service-setup-actions > p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.service-setup-actions.connected { display: none; }
.google-actions { padding-top: 2px; }
.google-actions > details { border: 1px solid var(--line); border-radius: 12px; padding: 0 13px; margin-bottom: 15px; background: rgba(232, 229, 220, .3); }
.google-checklist { margin: 0 0 12px; padding-left: 19px; color: var(--muted); font-size: 11px; }
.google-checklist li { margin: 7px 0; }
.google-checklist a, .text-link, .authorize-block a { color: var(--forest); font-weight: 750; }
.scope-details { border: 0; margin-bottom: 12px; }
.scope-details summary { padding: 7px 0; }
.scope-details code { display: block; margin: 5px 0; overflow-wrap: anywhere; }
.text-link { display: inline-block; margin: 2px 0 13px; font-size: 11px; }
.credential-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.credential-grid input { margin-bottom: 13px; }
.privacy-note { color: var(--muted); font-size: 10px !important; }
.file-drop { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 170px; border: 1px dashed rgba(24,49,45,.28); border-radius: 14px; cursor: pointer; background: rgba(232,229,220,.28); text-align: center; }
.file-drop:hover { border-color: var(--forest); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop b { font-size: 13px; }
.file-drop small { color: var(--muted); font-weight: 500; margin-top: 4px; }
.upload-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; margin-bottom: 10px; font-size: 19px; }
.file-drop.compact { min-height: 135px; margin-top: 8px; }
.selected-file { font-size: 11px; color: var(--muted); text-align: center; }
.help-details { margin-top: 18px; }
.help-details ol { margin: 0 0 18px; padding-left: 20px; font-size: 12px; color: var(--muted); }
.import-details { border-bottom: 0; }
code { background: var(--paper-2); padding: 2px 5px; border-radius: 4px; color: var(--ink); }

.history-section { padding-bottom: 120px; }
.section-heading.horizontal { display: flex; justify-content: space-between; align-items: end; margin-bottom: 36px; }
.history-list { border-top: 1px solid var(--line); }
.history-item { display: grid; grid-template-columns: 50px 1fr 150px 110px 110px auto; gap: 18px; align-items: center; padding: 18px 10px; border-bottom: 1px solid var(--line); }
.history-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--forest); }
.history-route b, .history-route small { display: block; }
.history-route small, .history-meta { color: var(--muted); font-size: 11px; }
.history-state { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.history-state.completed { color: #397051; }
.history-state.failed, .history-state.cancelled { color: #a34c3a; }
.history-log { border: 0; background: none; text-decoration: underline; cursor: pointer; font-size: 11px; }
.empty-state { color: var(--muted); padding: 30px 0; }

footer { border-top: 1px solid var(--line); min-height: 100px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 5vw, 76px); font-size: 11px; color: var(--muted); }
footer > span:first-child { color: var(--ink); font-weight: 800; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(470px, 100%); padding: 48px; background: rgba(251,250,246,.8); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.login-card h1 { font: 500 54px/.94 Georgia, serif; letter-spacing: -.045em; margin: 14px 0 24px; }
.login-copy { color: var(--muted); margin-bottom: 34px; }
.input-action { position: relative; }
.input-action input { padding-right: 55px; }
.icon-button { position: absolute; right: 5px; top: 5px; width: 37px; height: 37px; border: 0; border-radius: 9px; background: var(--forest); color: white; cursor: pointer; }

.folder-dialog { width: min(620px, calc(100% - 32px)); border: 0; padding: 0; border-radius: 22px; background: var(--white); color: var(--ink); box-shadow: 0 30px 90px rgba(15, 35, 31, .3); }
.folder-dialog::backdrop { background: rgba(18, 37, 34, .55); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; padding: 28px 30px 18px; }
.dialog-head h2 { margin: 0; font: 500 32px Georgia, serif; }
.dialog-close { border: 0; background: none; font-size: 30px; cursor: pointer; color: var(--muted); }
.breadcrumbs { padding: 10px 30px 14px; display: flex; gap: 5px; overflow-x: auto; }
.breadcrumbs button { border: 0; background: none; color: var(--muted); font-size: 11px; cursor: pointer; white-space: nowrap; }
.breadcrumbs button::after { content: " /"; color: var(--line); }
.folder-list { min-height: 250px; max-height: 400px; overflow: auto; border-block: 1px solid var(--line); }
.folder-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 30px; border: 0; border-bottom: 1px solid rgba(24,49,45,.07); background: transparent; text-align: left; cursor: pointer; }
.folder-list button:hover { background: var(--paper); }
.folder-glyph { width: 30px; height: 24px; border-radius: 4px; background: var(--coral-soft); display: grid; place-items: center; color: var(--coral); }
.folder-loading { padding: 35px 30px; color: var(--muted); }
.dialog-actions { padding: 18px 30px 26px; }
.dialog-actions .primary-button { margin: 0; }
.folder-dialog .form-error { padding: 0 30px; }
.setup-dialog { width: min(680px, calc(100% - 32px)); }
.wizard-body { padding: 0 30px 30px; }
.wizard-progress { height: 4px; background: var(--paper-2); border-radius: 999px; margin: 3px 0 25px; overflow: hidden; }
.wizard-progress span { display: block; width: 20%; height: 100%; background: var(--coral); transition: width .35s ease; }
.wizard-lead { margin: 0 0 12px; font: 500 23px/1.15 Georgia, serif; }
.authorize-block { padding: 20px; margin-bottom: 20px; border-radius: 14px; background: rgba(200, 220, 210, .28); border: 1px solid rgba(32, 79, 70, .16); }
.authorize-block ol { padding-left: 20px; color: var(--muted); font-size: 12px; }
.authorize-block li { margin: 7px 0; }
.command-box { position: relative; padding: 15px 88px 15px 14px; border-radius: 10px; background: var(--forest); color: white; overflow: auto; }
.command-box code { padding: 0; background: none; color: white; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.command-box button { position: absolute; right: 7px; top: 7px; border: 1px solid rgba(255,255,255,.25); border-radius: 7px; background: rgba(255,255,255,.1); color: white; padding: 6px 9px; cursor: pointer; font-size: 10px; }
.wizard-help { color: var(--muted); font-size: 12px; white-space: pre-line; max-height: 150px; overflow: auto; }
.wizard-body textarea { min-height: 115px; padding: 12px; resize: vertical; }
.wizard-body textarea { width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.55); border-radius: 11px; color: var(--ink); outline: none; margin-bottom: 14px; }
.wizard-body textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(32, 79, 70, .09); }
.wizard-body select { margin-bottom: 14px; }
.wizard-complete { text-align: center; padding: 24px 0 10px; }
.wizard-complete > span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 50%; background: var(--mint); color: var(--forest); font-size: 24px; }
.wizard-complete h3 { margin: 0; font: 500 34px/1 Georgia, serif; }
.wizard-complete p { color: var(--muted); }
.wizard-cancel { width: 100%; margin-top: 15px; border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 380px; padding: 13px 16px; color: white; background: var(--forest); border-radius: 11px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #8f3f30; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 70px; }
  .transfer-grid { grid-template-columns: 1fr; }
  .wide-heading { display: block; }
  .wide-heading > p { margin: 20px 0 0 40px; }
  .setup-grid { grid-template-columns: 1fr; }
  .route-panel { grid-template-columns: 1fr; }
  .route-connector { height: 55px; }
  .route-connector::before { width: 100%; height: 1px; top: 50%; left: 0; }
  .route-connector span { transform: rotate(90deg); }
  .history-item { grid-template-columns: 45px 1fr auto; }
  .history-meta { display: none; }
}

@media (max-width: 620px) {
  main { width: min(100% - 28px, 1180px); }
  .topbar { padding: 0 15px; }
  .status-pill { display: none; }
  .hero h1 { font-size: 50px; }
  .attention-banner { grid-template-columns: auto 1fr; }
  .attention-banner a { grid-column: 2; }
  .section-block { padding: 65px 0; }
  .route-half, .options-panel, .setup-panel { padding: 24px; }
  .details-grid { grid-template-columns: 1fr; }
  .section-heading.horizontal { display: block; }
  .section-heading.horizontal > p { margin-top: 20px; }
  .progress-meta { grid-template-columns: auto 1fr; }
  .progress-meta span:nth-last-child(-n+2) { display: none; }
  .active-actions { flex-direction: column; }
  .active-actions button { width: 100%; }
  .history-item { grid-template-columns: 38px 1fr; }
  .history-state, .history-log { grid-column: 2; }
  footer { flex-direction: column; justify-content: center; gap: 4px; text-align: center; }
  .login-card { padding: 34px 25px; }
  .login-card h1 { font-size: 44px; }
}
