:root {
  color-scheme: light;
  --egg-white: #f5f0e4;
  --ink: #1b1a17;
  --muted: #6f6b62;
  --line: #bdb7ab;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--egg-white);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.app-name {
  margin: 0 0 42px;
  font-size: .82rem;
  font-weight: 650;
  letter-spacing: .01em;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, .8fr);
  border-top: 1px solid var(--ink);
}

.upload-area { padding: 30px 42px 0 0; }

.intro,
.supporting-text {
  max-width: 620px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.drop-zone {
  position: relative;
  display: block;
  min-height: 240px;
  border: 1px dashed var(--ink);
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.is-dragging {
  border-style: solid;
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  pointer-events: none;
}

.drop-copy strong {
  max-width: 220px;
  font-size: 1rem;
  font-weight: 700;
}

.drop-copy em {
  color: var(--muted);
  font-size: .78rem;
  font-style: normal;
  font-weight: 500;
}

.drop-copy > span:not(.file-name) {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}

.file-name {
  overflow: hidden;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel {
  min-height: 560px;
  padding: 30px 0 0 34px;
  border-left: 1px solid var(--ink);
}

.settings-section + .settings-section {
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.section-name {
  margin: 0 0 20px;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.settings-grid { display: grid; gap: 22px; }

.settings-grid label {
  display: grid;
  gap: 8px;
  font-size: .88rem;
  font-weight: 650;
}

input[type="number"] {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

input[type="number"]:focus {
  outline: 0;
  border-bottom-width: 2px;
}

small,
.privacy-note {
  color: var(--muted);
  font-size: .77rem;
  font-weight: 400;
  line-height: 1.45;
}

.tariffs dl,
.results { margin: 0; }

.tariffs dl div,
.results div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.tariffs dt,
.results dt {
  color: var(--muted);
  font-size: .85rem;
}

.tariffs dd,
.results dd {
  margin: 0;
  font-size: .85rem;
  font-weight: 700;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--egg-white);
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover,
button.secondary {
  background: transparent;
  color: var(--ink);
}

button.secondary:hover {
  background: var(--ink);
  color: var(--egg-white);
}

.privacy-note { margin: 16px 0 0; }

.simple-page {
  max-width: 760px;
  padding-top: 30px;
  border-top: 1px solid var(--ink);
}

.status-line {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 700;
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 30px;
}

.results div:nth-child(odd) { padding-right: 20px; }
.results div:nth-child(even) {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.download-form { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.back-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--ink);
  font-size: .85rem;
}

@media (max-width: 800px) {
  .page { width: min(100% - 32px, 680px); padding-top: 28px; }
  .app-name { margin-bottom: 28px; }
  .workspace { grid-template-columns: 1fr; }
  .upload-area { padding: 26px 0 34px; }
  .settings-panel {
    min-height: 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .upload-grid,
  .results { grid-template-columns: 1fr; }
  .drop-zone { min-height: 190px; }
  .results div:nth-child(odd),
  .results div:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }
  .actions,
  button,
  .button { width: 100%; }
}
