/* Rechnung2XML — design system
   Palette: deep navy + slate + white, one accent blue.
   Self-contained: system font stack only, no external assets. */

:root {
  --navy: #0e2a47;
  --navy-2: #0a4a7d;
  --accent: #0b5fa5;
  --accent-dark: #084a82;
  --accent-soft: #e8f1f8;
  --ink: #1c2733;
  --slate: #40536a;
  --muted: #63768a;
  --line: #d9e2ec;
  --line-soft: #e6edf3;
  --bg: #f4f6f9;
  --surface: #fff;
  --ok-bg: #e9f7ee;  --ok-line: #8fce9f;  --ok-ink: #14532d;
  --err-bg: #fdeeee; --err-line: #e5a3a3; --err-ink: #7a1f1f;
  --warn-bg: #fff7e0; --warn-line: #e3c766;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(14, 42, 71, .05);
  --shadow-md: 0 12px 32px rgba(14, 42, 71, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid rgba(11, 95, 165, .45); outline-offset: 2px; }

/* ---------- header / footer ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px 28px; flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 16px;
}
.logo {
  color: var(--navy); font-weight: 800; font-size: 1.35rem;
  letter-spacing: -.02em; text-decoration: none;
  display: inline-flex; align-items: center;
}
.logo:hover { color: var(--navy); }
.logo img { display: block; height: 38px; width: auto; }
.site-header nav { display: flex; gap: 6px 26px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--slate); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.site-header nav a:hover { color: var(--navy); border-bottom-color: var(--accent); }

main.wrap { padding: 42px 20px 68px; }

.site-footer {
  background: var(--navy); color: #b9cbdd; font-size: .92rem;
  margin-top: 12px;
}
.site-footer a { color: #e6f0f8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-inner {
  display: flex; justify-content: space-between; gap: 10px 20px;
  flex-wrap: wrap; padding-top: 20px; padding-bottom: 4px;
}
.footer-inner:last-child { padding-bottom: 22px; }
.footer-links { border-top: 1px solid rgba(255, 255, 255, .14); font-size: .87rem; }

/* ---------- typography ---------- */

h1 { font-size: 2.05rem; line-height: 1.22; letter-spacing: -.015em;
     color: var(--navy); margin: 0 0 16px; }
h2 { font-size: 1.45rem; line-height: 1.3; letter-spacing: -.01em;
     color: var(--navy); margin: 46px 0 14px; }
h3 { font-size: 1.06rem; color: var(--navy); margin: 0 0 8px; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 5px; }
code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .86em; background: #eef3f8; border: 1px solid var(--line-soft);
  border-radius: 5px; padding: 1px 6px;
}
.small { font-size: .9rem; color: var(--muted); }
.crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 16px; }
.tool-intro { font-size: 1.13rem; line-height: 1.55; color: var(--slate);
              max-width: 46em; margin-bottom: 18px; }

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(125deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; border-radius: 16px; padding: 52px 54px;
  box-shadow: var(--shadow-md);
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 2.8rem); margin-bottom: 18px; }
.hero p.lead { font-size: 1.2rem; line-height: 1.55; color: #d9e8f4; max-width: 44em; margin: 0 0 26px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 12px 24px; border-radius: 8px; text-decoration: none;
  border: 1px solid var(--accent); font-size: 1rem; font-weight: 600;
  font-family: inherit; cursor: pointer; line-height: 1.35;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--navy); border-color: #b9c9d8; }
.btn.secondary:hover { background: var(--accent-soft); color: var(--navy); border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.hero .btn { background: #fff; border-color: #fff; color: var(--navy); }
.hero .btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--navy); }
.hero .btn.secondary { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.hero .btn.secondary:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; align-items: center; }

/* ---------- cards, steps, service box ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
}
.grid .card { transition: box-shadow .15s ease, transform .15s ease; }
.grid .card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card p:last-child { margin-bottom: 0; }

.card.price { border-top: 3px solid var(--accent); }
.card.price .amount { font-size: 2.5rem; font-weight: 800; letter-spacing: -.02em;
                      color: var(--navy); line-height: 1.1; margin-top: 6px; }
.card.price .per { color: var(--muted); font-size: .82rem; font-weight: 600;
                   text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }

.steps { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.step {
  flex: 1 1 220px; background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--accent); border-radius: 10px;
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.step b { display: block; margin-bottom: 5px; color: var(--navy); font-size: 1.02rem; }

.not-box {
  background: #f2f6fa; border: 1px solid var(--line-soft);
  border-left: 3px solid var(--muted); border-radius: 10px;
  padding: 20px 22px; align-self: start;
}
.not-box h3 { margin-top: 0; }
.not-box p { margin: 0; color: var(--slate); }

/* ---------- notices & result boxes ---------- */

.notice {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-left: 5px solid #dfa400; border-radius: 10px; padding: 17px 22px;
}
.error-box {
  background: var(--err-bg); border: 1px solid var(--err-line);
  border-left: 5px solid #cf3d3d; border-radius: 10px;
  padding: 15px 22px; margin-bottom: 20px; color: var(--err-ink);
}
.error-box ul { margin-bottom: 0; }
.ok-box {
  background: var(--ok-bg); border: 1px solid var(--ok-line);
  border-left: 5px solid #2e9e4f; border-radius: var(--radius);
  padding: 20px 24px;
}
.ok-box h3 { color: var(--ok-ink); }
.fail-box {
  background: var(--err-bg); border: 1px solid var(--err-line);
  border-left: 5px solid #cf3d3d; border-radius: var(--radius);
  padding: 20px 24px;
}
.fail-box h3 { color: var(--err-ink); }
.ok-box p:last-child, .fail-box p:last-child { margin-bottom: 0; }

.finding {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid #cf3d3d; border-radius: 8px;
  padding: 13px 18px; margin: 12px 0; box-shadow: var(--shadow-sm);
}
.finding.warn { border-left-color: #dfa400; }
.finding .code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .78rem; color: var(--muted);
}
.finding details { margin-top: 6px; color: var(--slate); font-size: .9rem; }
.finding details summary { cursor: pointer; font-weight: 600; }

/* ---------- forms ---------- */

form.upload, .panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
fieldset {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin: 0 0 20px; padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
legend { font-weight: 700; color: var(--navy); font-size: 1.02rem; padding: 0 8px; }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
        gap: 14px; margin-bottom: 14px; }
.frow:last-child { margin-bottom: 0; }
label { display: block; font-size: .88rem; font-weight: 600; color: var(--slate); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=date], select {
  width: 100%; padding: 10px 12px; border: 1px solid #b7c6d4; border-radius: 8px;
  font-size: .97rem; font-family: inherit; background: var(--surface); color: var(--ink);
}
input[type=file] {
  width: 100%; padding: 12px; border: 1px dashed #b7c6d4; border-radius: 8px;
  font-size: .97rem; font-family: inherit; background: #f8fafc; color: var(--ink);
}
input:focus, select:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px rgba(11, 95, 165, .16);
}

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.items { width: 100%; border-collapse: collapse; }
table.items th {
  text-align: left; font-size: .82rem; font-weight: 700; color: var(--slate);
  background: #eef3f8; padding: 9px 10px; border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
table.items td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.items td input, table.items td select { padding: 7px 9px; }
table.fristen td, table.fristen th { padding: 12px 14px; }

/* ---------- FAQ ---------- */

.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 15px 20px; margin: 12px 0; box-shadow: var(--shadow-sm);
}
.faq summary { font-weight: 600; color: var(--navy); cursor: pointer; }
.faq details p { margin: 10px 0 2px; }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  main.wrap { padding: 30px 16px 52px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 34px 24px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  form.upload, .panel { padding: 22px; }
  fieldset { padding: 16px; }
  h1 { font-size: 1.75rem; }
  h2 { margin-top: 36px; }
  .footer-inner { flex-direction: column; }
}
