/* Secrets – Ihre Helden. Farben und Schrift wie ihre-helden.de */

@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/red-hat-display-400.woff2) format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/red-hat-display-600.woff2) format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/red-hat-display-800.woff2) format("woff2"); }

:root {
  --navy: #172441;
  --navy-soft: #2b3a5e;
  --mint: #04d1a2;
  --mint-strong: #03b98f;
  --mint-wash: #e6faf5;
  --yellow: #feff59;
  --ink: #172441;
  --text: #2a3347;
  --muted: #5d6778;
  --line: #d9dee7;
  --line-soft: #e8ebf1;
  --bg: #f3f5f8;
  --card: #ffffff;
  --danger: #c0352b;
  --danger-wash: #fdeeed;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  font-family: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* --- Markenkopf --- */

.masthead {
  color: #fff;
  background:
    radial-gradient(900px 420px at 92% -20%, rgb(4 209 162 / 38%), transparent 62%),
    radial-gradient(700px 380px at -5% 130%, rgb(124 58 237 / 30%), transparent 60%),
    var(--navy);
  padding-bottom: 96px;
}
.bar { display: flex; align-items: center; gap: 14px; padding-top: 22px; padding-bottom: 22px; }
.logo { display: inline-flex; }
.logo img { display: block; height: 40px; width: auto; }
.product {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--mint);
  padding-left: 14px;
  border-left: 1px solid rgb(255 255 255 / 25%);
  line-height: 1.2;
}

.hero { padding-top: 36px; }
.hero h1 {
  font-weight: 800;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0;
  max-width: 16ch;
  color: #fff;
}
.hero h1 .accent { color: var(--mint); }
.hero .lead { margin: 14px 0 0; font-size: 19px; color: rgb(255 255 255 / 78%); max-width: 46ch; }

/* --- Inhalt --- */

/* Karte ragt in den Kopf hinein. main.wrap, weil .wrap sonst margin-top überschreibt. */
main.wrap { flex: 1; margin-top: -64px; }

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 24px 48px -28px rgb(23 36 65 / 45%), 0 2px 6px rgb(23 36 65 / 6%);
}
.card > p:first-child, .card form > p:first-child { margin-top: 0; }

h2 { font-weight: 800; font-size: 22px; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }

p { margin: 0 0 14px; }
a { color: var(--navy); text-underline-offset: 3px; }

label { display: block; font-weight: 600; color: var(--ink); margin: 20px 0 8px; font-size: 15px; }
form > label:first-child, .row label { margin-top: 0; }
.hint { font-size: 14.5px; color: var(--muted); margin: 8px 0 0; }

textarea, input[type=text], select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea {
  min-height: 260px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
}
textarea::placeholder, input::placeholder { color: #8b93a3; font-family: "Red Hat Display", system-ui, sans-serif; }
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgb(4 209 162 / 20%);
}
textarea[readonly], input[readonly] { background: #f8f9fb; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23172441' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
input[type=file] {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 26px 16px;
  background: #f8f9fb;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  cursor: pointer;
}
input[type=file]::file-selector-button {
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  margin-right: 12px;
  cursor: pointer;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.choice { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.choice label {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; font-weight: 600;
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.choice label:has(input:checked) { border-color: var(--mint); background: var(--mint-wash); }
.choice input { accent-color: var(--mint-strong); margin: 0; }

/* --- Knöpfe --- */

.icon { flex: none; }

button.primary, a.primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  margin-top: 22px;
  padding: 15px 20px;
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  color: var(--navy);
  background: var(--mint);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .05s;
}
button.primary:hover, a.primary:hover { background: var(--mint-strong); }
button.primary:active { transform: translateY(1px); }
button.primary:disabled { opacity: .55; cursor: progress; }
button.primary:focus-visible, a.primary:focus-visible, button.secondary:focus-visible, a.secondary:focus-visible {
  outline: 3px solid var(--navy); outline-offset: 2px;
}

button.secondary, a.secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 15.5px;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
button.secondary:hover, a.secondary:hover { border-color: var(--navy); }
a.block, button.block { display: flex; width: 100%; margin-top: 10px; padding: 14px 16px; }
button.danger { color: var(--danger); }
button.danger:hover { border-color: var(--danger); }

/* --- Umschalter Text / Datei / Anfrage (Büro) --- */

.tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  background: #eef1f5;
  border-radius: 12px;
}
.tabs button {
  appearance: none; border: 0; background: none;
  font: inherit; font-weight: 600; font-size: 15.5px;
  color: var(--muted);
  padding: 9px 18px;
  border-radius: 9px;
  cursor: pointer;
}
.tabs button:hover { color: var(--navy); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgb(23 36 65 / 14%); }

/* --- Ergebnis, Link-Feld --- */

.copy { display: flex; gap: 10px; }
.copy input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 14px; }
.result > input[type=text] { font-family: var(--mono); font-size: 14px; margin-top: 4px; }
.result + .result { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
/* Folgt ein Block auf einen ausgeblendeten, ist er optisch der erste */
.result[hidden] + .result { margin-top: 0; padding-top: 0; border-top: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* --- Hinweise --- */

.box { border-radius: 10px; padding: 13px 16px; margin-top: 18px; font-size: 15.5px; }
.error { background: var(--danger-wash); color: var(--danger); }
.ok { background: var(--mint-wash); color: var(--ink); }
.notice { background: #fffde0; border: 1px solid #ecea8f; color: var(--ink); }
.preview-banner {
  margin: 0 0 18px;
  background: rgb(254 255 89 / 14%);
  border: 1px solid rgb(254 255 89 / 45%);
  color: #fff;
}
.preview-banner a { color: var(--yellow); }

.trust {
  display: flex; align-items: center; gap: 10px;
  margin: 26px -32px -32px;
  padding: 16px 32px;
  border-top: 1px solid var(--line-soft);
  background: #fafbfc;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 14.5px;
  color: var(--muted);
}
.trust .icon { color: var(--mint-strong); }

.fineprint { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

progress { width: 100%; height: 8px; margin-top: 18px; accent-color: var(--mint-strong); }

/* --- Countdown (Geheimnis öffnen) --- */

.countdown {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 8px 0 4px;
}
.countdown div {
  background: #f6f8fb;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px 6px 10px;
  text-align: center;
}
.countdown span { display: block; font-weight: 800; font-size: 30px; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.countdown small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.request-note {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0 4px 16px;
  border-left: 4px solid var(--mint);
  margin-bottom: 22px;
  white-space: pre-line;
}

.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.file-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 12px;
  background: #f8f9fb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 15px;
}
.file-list li span:first-child { overflow-wrap: anywhere; color: var(--ink); }
.file-list li span:last-child { color: var(--muted); white-space: nowrap; }
.file-list li.done span:last-child { color: var(--mint-strong); font-weight: 600; }

.sender { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.sender .icon { color: var(--mint-strong); }

/* --- Abholen (Büro) --- */

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0 0 18px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.uploads { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.uploads li { border: 1.5px solid var(--line-soft); border-radius: 12px; padding: 16px; }
.uploads strong { display: block; margin-bottom: 10px; color: var(--ink); overflow-wrap: anywhere; }

/* --- Fuß --- */

.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 32px; padding-bottom: 32px;
  font-size: 14px; color: var(--muted);
}
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--navy); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Handy --- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .masthead { padding-bottom: 72px; }
  .bar { padding-top: 16px; padding-bottom: 16px; }
  .logo img { height: 34px; }
  .hero { padding-top: 18px; }
  .hero .lead { font-size: 17px; }
  main.wrap { margin-top: -48px; }
  .card { padding: 22px 18px; }
  .trust { margin: 22px -18px -22px; padding: 14px 18px; }
  .row { grid-template-columns: 1fr; }
  .copy { flex-direction: column; }
  .countdown { gap: 6px; }
  .countdown span { font-size: 24px; }
  .tabs { display: flex; }
  .tabs button { flex: 1; padding: 9px 10px; }
  .site-footer { justify-content: center; text-align: center; }
}

/* --- Nutzung (nur Büro) --- */

.bar-nav { margin-left: auto; }
.bar-link { color: rgb(255 255 255 / 82%); font-weight: 600; font-size: 15px; text-decoration: none; }
.bar-link:hover { color: #fff; text-decoration: underline; }

.usage h2 { margin-top: 36px; }
.usage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.usage-head .hint { margin: 0; flex: 1 1 260px; }
.range { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 4px; gap: 2px; }
.range a { padding: 6px 12px; border-radius: 7px; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; }
.range a:hover { color: var(--navy); }
.range a[aria-current="page"] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgb(23 36 65 / 14%); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 24px; }
.tile { border: 1px solid var(--line-soft); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; }
.tile-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.tile-value { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 13.5px; color: var(--muted); line-height: 1.35; margin-top: 4px; }

.chart-row { margin-top: 22px; }
.chart-row h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.chart-row h3 span { color: var(--muted); font-weight: 400; margin-left: 6px; font-variant-numeric: tabular-nums; }
.chart-pair { display: grid; grid-template-columns: 3fr 1fr; gap: 28px; }
.chart { margin: 0; position: relative; padding-top: 18px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart path { fill: var(--navy); }
.chart g:hover path { fill: var(--navy-soft); }
.chart .hit { fill: transparent; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .base { stroke: var(--line); stroke-width: 1; }
.chart-max { position: absolute; top: 0; left: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.axis-week span { flex: 1; text-align: center; }

.tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  background: var(--navy); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 5px 9px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 6px 16px rgb(23 36 65 / 25%);
}

.table-view { margin-top: 22px; }
.table-view summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 15px; }
.table-scroll { overflow-x: auto; margin-top: 10px; max-height: 420px; overflow-y: auto; }
.table-view table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
.table-view th:first-child, .table-view td:first-child { text-align: left; }
.table-view th { position: sticky; top: 0; background: #fff; color: var(--muted); font-weight: 600; }

.storage .meter { display: block; width: 100%; height: auto; margin: 12px 0 12px; }
.storage .track { fill: var(--line-soft); }
.storage .fill { fill: var(--mint-strong); }
.storage .fill.tight { fill: var(--danger); }
.storage p { margin: 0 0 6px; }

@media (max-width: 640px) {
  .chart-pair { grid-template-columns: 1fr; gap: 14px; }
  .chart-week { max-width: 230px; }
  .tile-value { font-size: 28px; }
}
