:root {
  --ink: #0d2930;
  --ink-soft: #25454d;
  --muted: #60767b;
  --petroleum-950: #072f38;
  --petroleum-900: #0a3f49;
  --petroleum-800: #0c5661;
  --petroleum-700: #14707a;
  --petroleum-100: #d9ecee;
  --petroleum-50: #edf6f6;
  --line: #cfe0e2;
  --paper: #eef4f4;
  --warning-bg: #fff8e8;
  --warning-line: #e4bd64;
  --shadow: 0 22px 70px rgba(7, 47, 56, 0.1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 8% 0%, rgba(20, 112, 122, 0.1), transparent 28rem), linear-gradient(180deg, #f7fafa 0, var(--paper) 30rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, .drop:focus-within { outline: 3px solid rgba(20, 112, 122, 0.28); outline-offset: 3px; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 24px; }
.siteHeader { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; margin-bottom: 30px; }
.brandMark { position: relative; display: grid; grid-template-columns: 1fr 1fr; place-items: center; width: 68px; height: 68px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 19px; background: linear-gradient(145deg, var(--petroleum-700), var(--petroleum-950)); color: white; box-shadow: 0 14px 30px rgba(7, 47, 56, .2); font-size: 18px; font-weight: 850; }
.brandMark::after { content: ""; position: absolute; inset: 11px 50% 11px auto; width: 1px; background: rgba(255,255,255,.25); }
.headerCopy { min-width: 0; }
.eyebrow, .sectionLabel { margin: 0; color: var(--petroleum-700); font-size: .75rem; font-weight: 850; letter-spacing: .13em; }
.siteHeader h1 { margin: 5px 0 8px; color: var(--petroleum-950); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.02; letter-spacing: -.045em; }
.siteHeader p:last-child { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.formatBadges { display: flex; gap: 7px; align-self: start; padding-top: 7px; }
.formatBadges span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.74); color: var(--petroleum-800); font-size: .75rem; font-weight: 850; letter-spacing: .04em; }
.tabs { display: flex; gap: 8px; width: max-content; max-width: 100%; margin-bottom: 14px; padding: 6px; border: 1px solid #d6e3e5; border-radius: 15px; background: #dde9ea; }
.tabs button { display: flex; gap: 9px; align-items: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: transparent; color: #506b70; cursor: pointer; font-size: .9rem; font-weight: 760; transition: background .18s ease, box-shadow .18s ease, color .18s ease; }
.tabs button.active { background: white; color: var(--petroleum-800); box-shadow: 0 4px 12px rgba(7, 47, 56, .09); }
.tabNumber { color: #769096; font-size: .72rem; letter-spacing: .04em; }
.tabs button.active .tabNumber { color: var(--petroleum-700); }
.panel { position: relative; overflow: hidden; padding: clamp(22px, 4vw, 40px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--petroleum-950), var(--petroleum-700), #77aeb4); }
.panelHeader { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 26px; }
.panelHeader h2 { margin: 6px 0 8px; color: var(--petroleum-950); font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; }
.panelHeader p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }
.localBadge { display: inline-flex; flex: none; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #cde1df; border-radius: 999px; background: #eff8f6; color: #315f5d; font-size: .78rem; font-weight: 760; }
.localBadge i { width: 7px; height: 7px; border-radius: 50%; background: #2b8a78; }
.drop { display: flex; min-height: 188px; padding: 26px; border: 1.5px dashed #8caaaf; border-radius: 18px; align-items: center; justify-content: center; flex-direction: column; background: linear-gradient(180deg, #fbfdfd, #f3f8f8); cursor: pointer; text-align: center; transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
.drop:hover, .drop.dragging { border-color: var(--petroleum-700); background: var(--petroleum-50); box-shadow: inset 0 0 0 1px rgba(20,112,122,.08); }
.drop.dragging { transform: translateY(-2px); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop strong { color: var(--ink-soft); font-size: 1rem; overflow-wrap: anywhere; }
.drop small { margin-top: 12px; color: var(--muted); font-size: .82rem; }
.uploadIcon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 13px; border: 1px solid #bdd5d8; border-radius: 13px; background: white; color: var(--petroleum-700); box-shadow: 0 7px 18px rgba(7,47,56,.08); font-size: 1.35rem; font-weight: 700; }
.dropOr { margin: 9px 0; color: #84989c; font-size: .78rem; }
.selectButton { display: inline-flex; min-height: 42px; padding: 0 18px; border-radius: 10px; align-items: center; background: var(--petroleum-800); color: white; box-shadow: 0 7px 16px rgba(12,86,97,.2); font-size: .88rem; font-weight: 780; }
.cardDrop { min-height: 208px; }
.fileList { display: grid; gap: 8px; margin-top: 16px; }
.fileRow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 58px; padding: 9px 12px; border: 1px solid #dae6e7; border-radius: 12px; background: #fbfdfd; }
.fileType { display: grid; place-items: center; width: 48px; height: 34px; border-radius: 8px; background: var(--petroleum-100); color: var(--petroleum-800); font-size: .7rem; font-weight: 850; }
.fileRow div { min-width: 0; }
.fileRow strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.fileRow small { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; }
.fileRow button { border: 0; background: transparent; color: #6a7f84; cursor: pointer; font-size: .78rem; font-weight: 700; }
.fileRow button:hover { color: #9a3d3d; }
.progress { height: 5px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #dfe9ea; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--petroleum-700); transition: width .25s ease; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.actions button, .previewHeader button { min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink-soft); cursor: pointer; font-size: .86rem; font-weight: 780; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.actions button:hover:not(:disabled), .previewHeader button:hover:not(:disabled) { border-color: #9bb9bd; box-shadow: 0 5px 13px rgba(7,47,56,.08); transform: translateY(-1px); }
.actions button.primary { border-color: var(--petroleum-800); background: linear-gradient(135deg, var(--petroleum-700), var(--petroleum-950)); color: white; box-shadow: 0 7px 17px rgba(7,47,56,.18); }
.actions button.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.actions button:disabled, .previewHeader button:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.status { margin-left: auto; color: var(--muted); font-size: .8rem; font-weight: 620; }
.issues { display: grid; gap: 8px; margin: -4px 0 18px; }
.issue { display: grid; grid-template-columns: minmax(130px, .32fr) 1fr; gap: 12px; padding: 12px 14px; border: 1px solid var(--warning-line); border-radius: 11px; background: var(--warning-bg); color: #735923; font-size: .82rem; line-height: 1.45; }
.issue.single { margin: -4px 0 18px; }
.issue strong { overflow-wrap: anywhere; }
.previewBlock { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #f8fbfb; }
.previewHeader { display: flex; min-height: 54px; padding: 8px 11px 8px 16px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: white; }
.previewHeader > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.previewHeader span { color: var(--petroleum-700); font-size: .72rem; font-weight: 850; letter-spacing: .1em; }
.previewHeader select { max-width: 340px; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); font-size: .8rem; }
.previewHeader button { min-height: 34px; padding: 0 12px; font-size: .78rem; }
textarea { display: block; width: 100%; height: 290px; resize: vertical; padding: 18px; border: 0; outline: 0; background: transparent; color: #294b52; font: .81rem/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
textarea::placeholder { color: #82979b; }
footer { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px 4px 0; color: #6a8085; font-size: .78rem; }
footer p { margin: 0; }
footer a { color: var(--petroleum-800); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .shell { padding-top: 24px; }
  .siteHeader { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .formatBadges { grid-column: 2; padding-top: 0; }
  .brandMark { width: 56px; height: 56px; border-radius: 16px; }
  .siteHeader h1 { font-size: 2rem; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; justify-content: center; padding: 0 12px; }
  .panelHeader { display: block; }
  .localBadge { margin-top: 16px; }
  .status { width: 100%; margin-left: 0; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 540px) {
  .shell { width: min(100% - 20px, 1120px); }
  .siteHeader { gap: 13px; margin-bottom: 22px; }
  .siteHeader p:last-child { font-size: .9rem; }
  .formatBadges span { padding: 5px 7px; font-size: .66rem; }
  .tabs { display: grid; grid-template-columns: 1fr; }
  .tabs button { justify-content: flex-start; }
  .panel { padding: 22px 16px; border-radius: 19px; }
  .drop { min-height: 176px; padding: 20px 12px; }
  .fileRow { grid-template-columns: auto minmax(0, 1fr); }
  .fileRow button { grid-column: 2; justify-self: start; padding: 0; }
  .actions button { flex: 1 1 calc(50% - 10px); }
  .actions button.primary { flex-basis: 100%; }
  .issue { grid-template-columns: 1fr; gap: 5px; }
  .previewHeader { align-items: stretch; flex-direction: column; }
  .previewHeader > div { align-items: stretch; flex-direction: column; gap: 7px; }
  .previewHeader select { max-width: none; width: 100%; }
  textarea { height: 250px; }
}

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