/* 22degree Apps – gleiche Handschrift wie Galerie und Files: weiß, Montserrat/Roboto Condensed, Verlauf Blau → Türkis */
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url(fonts/Montserrat-Regular.ttf) format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url(fonts/Montserrat-SemiBold.ttf) format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url(fonts/Montserrat-Bold.ttf) format("truetype"); }
@font-face { font-family: "Roboto Condensed"; font-weight: 400; font-display: swap; src: url(fonts/RobotoCondensed-Regular.ttf) format("truetype"); }

:root {
  --fg: #262626; --muted: #7a7a7a; --line: #e4e7e9; --bg: #f5f7f8; --card: #fff; --danger: #b3261e; --ok: #1a8f84;
  --blue: #009fe3; --mark: #27ccc0; --grad: linear-gradient(120deg, #009fe3, #27ccc0);
  --head: "Montserrat", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --text: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font: 400 17px/1.5 var(--text); color: var(--fg); background: var(--bg); min-height: 100vh; }
a { color: inherit; }
[hidden] { display: none !important; }

h1 { font: 700 30px/1.15 var(--head); text-transform: uppercase; letter-spacing: .02em; color: #000; margin: 0 0 10px; }
h2 { font: 600 13px/1.2 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #000; margin: 34px 0 16px; }
.kicker { font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .24em; margin: 0 0 14px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.muted { color: var(--muted); }
.err { color: var(--danger); }
.ok { color: var(--ok); }

/* Kopfzeile */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.top .logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.top .logo img { height: 30px; width: auto; filter: brightness(0); }
.top .logo span { font: 600 12px/1 var(--head); text-transform: uppercase; letter-spacing: .2em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
.top nav.right { display: flex; align-items: center; gap: 22px; }
.top nav.right a, .top nav.right .link { font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #8a8a8a; text-decoration: none; }
.top nav.right a:hover, .top nav.right .link:hover { color: #fff; }
.top nav.right form { margin: 0; display: flex; }
.top nav .link { line-height: 1; }


/* Kopfzeile wie in der Galerie: schwarzer Balken, Schriftzug 22DEGREE fett + Tool-Name normal */
.top { background: #000; color: #fff; border-bottom: 0; padding: 18px 28px; }
.wordmark { font: 400 14px/1 var(--head); text-transform: uppercase; letter-spacing: .16em; color: #fff; text-decoration: none; white-space: nowrap; }
.wordmark strong { font-weight: 700; }

/* Menü „22DEGREE Apps ▾“ */
.menu { position: relative; }
.menu summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i { font-style: normal; color: #8a8a8a; font-size: 11px; transition: transform .15s; }
.menu[open] summary i { transform: rotate(180deg); }

/* Rahmen */
main { max-width: 1080px; margin: 0 auto; padding: 48px 24px 40px; }
main.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card { background: var(--card); border: 1px solid var(--line); padding: 34px; }
.narrow { width: 100%; max-width: 440px; margin: 0 auto; }
main.center .card { text-align: center; }
.mark { height: 44px; width: auto; filter: brightness(0); display: block; margin: 0 auto 22px; }
.foot { text-align: center; font-size: 14px; color: var(--muted); margin: 40px 0 0; }
.back { margin: 22px 0 0; font-size: 15px; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: #000; }

/* Formulare */
.stack { display: grid; gap: 14px; text-align: left; margin-top: 22px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
label.check { display: flex; gap: 10px; align-items: center; color: var(--fg); font-size: 16px; }
label.check input { width: auto; }
input { font: 400 17px/1.3 var(--text); color: var(--fg); border: 1px solid var(--line); border-radius: 0; padding: 11px 12px; background: #fff; width: 100%; min-width: 0; }
input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
button { font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #fff; background: #000; border: 1px solid #000; border-radius: 0; padding: 14px 20px; cursor: pointer; white-space: nowrap; }
button:hover { background: #333; }
button.small { padding: 9px 12px; font-size: 10px; }
button.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: var(--danger); color: #fff; }
button.link { background: none; border: 0; padding: 0; }

button.ghost { background: #fff; color: #000; }
button.ghost:hover { background: var(--bg); }

/* Zweite Stufe */
input.code { font: 600 26px/1 var(--head); letter-spacing: .3em; text-align: center; padding: 14px; }
.setup2 { max-width: 480px; }
.setup2 .steps { text-align: left; padding-left: 20px; margin: 18px 0 10px; }
.setup2 .steps li { margin: 4px 0; }
.qr { width: 210px; height: 210px; margin: 6px auto 10px; background: #fff; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }
.small { font-size: 14px; }
code { font: 14px ui-monospace, Menlo, monospace; background: var(--bg); padding: 2px 6px; white-space: nowrap; }

/* Begrüßung */
.hero { margin: 0 0 34px; }
.hero h1 { font-size: clamp(28px, 4vw, 40px); }
.hero .muted { font-size: 19px; margin: 0; }

/* Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tile { position: relative; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 10px; min-height: 250px; padding: 28px; background: var(--card);
  border: 1px solid var(--line); text-decoration: none; color: var(--fg); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
a.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 60, 80, .10); border-color: #d6dde0; }
a.tile:hover::before, a.tile:focus-visible::before { transform: scaleX(1); }
a.tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tile .icon { width: 54px; height: 54px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 6px; }
.tile .icon svg { width: 28px; height: 28px; }
.tile .name { font: 700 20px/1.2 var(--head); text-transform: uppercase; letter-spacing: .03em; color: #000; }
.tile .text { font-size: 16px; color: #555; }
/* Speicher je App */
.tile .usage { display: grid; gap: 10px; padding-top: 4px; }
.tile .urow { display: grid; gap: 5px; }
.tile .ulabel { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; font-size: 14px; color: #555; }
.tile .ulabel b { font: 600 10px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #000; }
.tile .ulabel em { font-style: normal; color: var(--muted); margin-left: auto; font-size: 13px; }
.tile .ubar { display: block; height: 5px; background: #e9eef0; overflow: hidden; }
.tile .ubar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .6s ease; }
.tile .urow.full .ubar span { background: var(--danger); }
.tile .host { font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); }
.tile .arrow { display: inline-block; color: var(--blue); transition: transform .18s ease; }
a.tile:hover .arrow { transform: translateX(4px); }
.tile.soon { background: transparent; border-style: dashed; }
.tile.soon .icon { background: #e4e9eb; color: #8a979d; }
.tile.soon .name, .tile.soon .text { color: var(--muted); }

/* Team */
.notice { background: #effbfa; border: 1px solid #bfeee9; padding: 14px 16px; margin: 18px 0 6px; }
.notice p { margin: 0 0 8px; }
.linkrow { display: flex; gap: 8px; }
.linkrow input { font: 14px ui-monospace, Menlo, monospace; padding: 9px 10px; }
table.users { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 16px; }
.users td { border-top: 1px solid var(--line); padding: 14px 12px 14px 0; vertical-align: middle; }
.users td.actions { text-align: right; white-space: nowrap; }
.users form.inline { display: inline-flex; gap: 6px; margin: 0 0 0 6px; vertical-align: middle; }
.users form.inline input { width: 190px; padding: 7px 9px; font-size: 15px; }
.users details.reset { display: inline-block; vertical-align: middle; }
.users details.reset summary { cursor: pointer; list-style: none; font: 600 10px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 10px 8px; }
.users details.reset summary::-webkit-details-marker { display: none; }
.users details.reset[open] summary { display: none; }
.tag { font: 600 9px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; background: var(--grad); color: #fff; padding: 3px 6px; vertical-align: 2px; }
.addform { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.addform label.check, .addform button { grid-column: 1 / -1; justify-self: start; }

@media (max-width: 720px) {
  .top { padding: 12px 16px; }
  .top nav.right { gap: 14px; }
  main { padding: 28px 16px; }
  .card { padding: 24px 18px; }
  .tile { min-height: 0; padding: 22px; }
  .addform { grid-template-columns: 1fr; }
  .users tr { display: grid; border-top: 1px solid var(--line); padding: 10px 0; }
  .users td { border: 0; padding: 3px 0; }
  .users td.actions { text-align: left; white-space: normal; }
  .users form.inline { margin: 6px 6px 0 0; }
}

/* Aufklappmenü wie die Kopfzeile: schwarz, je App der Schriftzug „22DEGREE Name“, blendet nach unten ein */
.menu nav { position: absolute; top: calc(100% + 18px); left: -28px; z-index: 30; min-width: 280px; display: block;
  background: #000; border: 0; padding: 4px 0 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); animation: menudown .22s ease-out both; }
.menu nav a { display: block; padding: 14px 28px; font: 400 14px/1 var(--head); text-transform: uppercase; letter-spacing: .16em;
  color: #fff; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.menu nav a strong { font-weight: 700; }
.menu nav a:hover span { background: linear-gradient(90deg, #009fe3, #27ccc0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.menu nav a.here { color: #6f6f6f; }
.menu nav a.here:hover span { background: none; color: #6f6f6f; }
.menu nav a.out { font: 600 11px/1 var(--head); letter-spacing: .14em; color: #8a8a8a; border-top: 1px solid #222; margin-top: 6px; padding-top: 16px; }
@keyframes menudown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu nav { animation: none; } }
