/* Nitrox-Kursbegleitung – baut auf /style.css (pf-tool-main, pf-tool-frame, --site-*) auf.
   Nitrox-Farbe: das Grün-Gelb der Nitrox-Flaschenmarkierung, sparsam eingesetzt. */

.nx-tool {
  --nx-ink: var(--site-text, #1b2030);
  --nx-muted: var(--site-muted, #5b6273);
  --nx-line: var(--site-line, #e6e8ee);
  --nx-soft: var(--site-soft, #f3f4f7);
  --nx-blue: var(--site-blue, #3b22a3);
  --nx-green: #2f8f3a;
  --nx-green-soft: #e8f5e9;
  --nx-yellow: var(--site-yellow, #f4c542);
  --nx-yellow-soft: #fdf6dc;
  --nx-warn: #b45309;
  --nx-warn-soft: #fff4e5;
}

.pf-tool-frame.nx-tool {
  max-width: 980px;
  padding: 24px 28px 32px;
  color: var(--nx-ink);
  line-height: 1.55;
}

.nx-head h1 { margin: 0 0 .4rem; }
.nx-kicker { margin: 0 0 .2rem; font-size: .85rem; font-weight: 600; letter-spacing: .02em; color: var(--nx-green); text-transform: uppercase; }
.nx-intro { margin: 0 0 1rem; max-width: 70ch; }
.nx-muted { color: var(--nx-muted); }
.nx-note { font-size: .9rem; color: var(--nx-muted); margin: .4rem 0 0; }
.nx-lead { margin: 0 0 1rem; max-width: 70ch; }
.nx-ok { margin: .6rem 0 0; font-weight: 600; color: var(--nx-green); }

/* Konto */
.nx-account { border: 1px solid var(--nx-line); background: var(--nx-soft); border-radius: 12px; padding: 12px 16px; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.nx-account p { margin: 0; flex: 1 1 260px; }
.nx-account.is-warn { background: var(--nx-warn-soft); border-color: #f3d19c; }
.nx-meter { flex: 1 1 260px; display: grid; gap: 4px; font-size: .9rem; }
.nx-meter__track { height: 8px; border-radius: 99px; background: #fff; border: 1px solid var(--nx-line); overflow: hidden; }
.nx-meter__track i { display: block; height: 100%; background: var(--nx-green); border-radius: 99px; transition: width .3s; }

/* Weg in 5 Stationen */
.nx-steps { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; counter-reset: nx; }
.nx-step { position: relative; padding: 10px 10px 10px 12px; border-radius: 10px; background: var(--nx-soft); border: 1px solid var(--nx-line); counter-increment: nx; font-size: .85rem; line-height: 1.3; }
.nx-step b { display: block; font-size: .95rem; margin-bottom: 2px; }
.nx-step b::before { content: counter(nx) " · "; color: var(--nx-muted); font-weight: 600; }
.nx-step span { color: var(--nx-muted); }
.nx-step.is-cert { background: var(--nx-yellow-soft); border-color: #f0dc95; }
.nx-step.is-done { background: var(--nx-green-soft); border-color: #b7dfbb; }
.nx-step.is-done b::before { content: "✓ "; color: var(--nx-green); }

/* Abschnitte */
.nx-section { margin: 0 0 2rem; }
.nx-section > h2, .nx-limit h2 { margin: 0 0 .4rem; font-size: 1.35rem; }
.nx-section h3 { margin: 1.2rem 0 .4rem; font-size: 1.05rem; }

/* Kapitel-Karten */
.nx-card { border: 1px solid var(--nx-line); border-radius: 12px; margin: 0 0 8px; background: #fff; }
.nx-card summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 12px 16px; font-weight: 600; }
.nx-card summary::-webkit-details-marker { display: none; }
.nx-card summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--nx-muted); border-bottom: 2px solid var(--nx-muted); transform: rotate(45deg); transition: transform .2s; flex: none; }
.nx-card[open] summary::after { transform: rotate(-135deg); }
.nx-card__check { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--nx-line); }
.nx-card.is-done .nx-card__check { background: var(--nx-green); border-color: var(--nx-green); position: relative; }
.nx-card.is-done .nx-card__check::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.nx-card__body { padding: 0 16px 14px 48px; }
.nx-card__body > p { margin: 0 0 .4rem; }
.nx-lessons { margin: 0 0 .8rem; padding-left: 1.1rem; color: var(--nx-muted); font-size: .92rem; }

.nx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; margin: .4rem 0 .8rem; }
.nx-group h4 { margin: 0 0 .3rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--nx-muted); }
.nx-links { display: grid; gap: 4px; }

/* Links */
.nx-link { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--nx-line); background: #fff; color: var(--nx-ink); text-decoration: none; font-size: .93rem; line-height: 1.3; }
.nx-link:hover, .nx-link:focus-visible { border-color: var(--nx-blue); color: var(--nx-blue); }
.nx-link__icon { flex: none; width: 18px; height: 18px; background: currentColor; opacity: .75;
  -webkit-mask: var(--nx-icon) center / contain no-repeat; mask: var(--nx-icon) center / contain no-repeat; }
.nx-link__title { flex: 1; }
.nx-link__meta { flex: none; font-size: .8rem; color: var(--nx-muted); font-variant-numeric: tabular-nums; }
.nx-link--video { --nx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='m10 9 5 3-5 3z' fill='black'/%3E%3C/svg%3E"); }
.nx-link--page { --nx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E"); }
.nx-link--tool { --nx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 12h2M12 12h2M8 16h2M12 16h2'/%3E%3C/svg%3E"); }
.nx-link--quiz { --nx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
.nx-link--ssi, .nx-link--login { display: inline-flex; background: var(--nx-blue); border-color: var(--nx-blue); color: #fff; font-weight: 600; padding: 8px 14px; }
.nx-link--ssi:hover, .nx-link--login:hover, .nx-link--ssi:focus-visible, .nx-link--login:focus-visible { color: #fff; filter: brightness(1.15); }
.nx-link--ssi { --nx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E"); }
.nx-link--login { --nx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.nx-link--ssi .nx-link__icon, .nx-link--login .nx-link__icon { opacity: 1; }

.nx-badge { flex: none; font-size: .75rem; padding: 1px 8px; border-radius: 99px; background: var(--nx-soft); color: var(--nx-muted); }
.nx-badge:empty { display: none; }
.nx-badge.is-done { background: var(--nx-green-soft); color: var(--nx-green); }
.nx-practice { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 1rem; }
.nx-practice p { margin: 0; flex-basis: 100%; }

/* Abhaken */
.nx-tick { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--nx-soft); border: 1px dashed #cfd3dc; cursor: pointer; font-weight: 600; }
.nx-tick input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--nx-green); cursor: inherit; }
.nx-tick:has(input:disabled) { cursor: not-allowed; opacity: .75; font-weight: 500; }
.nx-tick__text { flex: 1; }
.nx-tick__date { flex: none; font-size: .8rem; font-weight: 500; color: var(--nx-green); }
.nx-tick.is-done { background: var(--nx-green-soft); border: 1px solid #b7dfbb; }
.nx-tick.is-busy { opacity: .6; pointer-events: none; }

/* Grenze 32 % */
.nx-limit { display: flex; gap: 18px; align-items: flex-start; margin: 0 0 2rem; padding: 18px 20px; border-radius: 14px; background: var(--nx-yellow-soft); border: 2px solid var(--nx-yellow); }
.nx-limit.is-done { background: var(--nx-green-soft); border-color: var(--nx-green); }
.nx-limit__mark { flex: none; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: #fff; border: 4px solid var(--nx-green); font-weight: 800; font-size: 1.15rem; color: var(--nx-green); }
.nx-limit__text p { margin: .2rem 0 0; }

/* Workshop */
.nx-howto { margin: 0 0 1rem; padding-left: 1.3rem; display: grid; gap: 6px; }
.nx-confirm { border: 2px solid var(--nx-line); border-radius: 14px; padding: 14px 16px; }
.nx-confirm.is-done { border-color: var(--nx-green); }
.nx-confirm__hint { margin: 0 0 .7rem; }

/* Meldung */
.nx-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s; background: var(--nx-ink); color: #fff; padding: 8px 16px; border-radius: 99px; font-size: .9rem; z-index: 50; }
.nx-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.nx-toast.is-bad { background: #b42318; }

@media (max-width: 760px) {
  .pf-tool-frame.nx-tool { padding: 18px 16px 24px; }
  .nx-steps { grid-template-columns: 1fr; }
  .nx-card__body { padding: 0 14px 14px; }
  .nx-limit { flex-direction: column; gap: 10px; }
  .nx-limit__mark { width: 60px; height: 60px; font-size: 1rem; }
}

/* Admin-Liste */
.nx-admin table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.nx-admin th, .nx-admin td { padding: 8px 6px; border-bottom: 1px solid var(--nx-line); text-align: left; vertical-align: top; }
.nx-admin th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--nx-muted); }
.nx-admin td small { color: var(--nx-muted); display: block; }
.nx-admin .is-due { background: var(--nx-yellow-soft); }
.nx-admin button { font: inherit; font-size: .85rem; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--nx-line); background: #fff; cursor: pointer; }
.nx-admin button.is-done { background: var(--nx-green-soft); border-color: #b7dfbb; color: var(--nx-green); }
.nx-admin button.is-due { background: var(--nx-yellow); border-color: var(--nx-yellow); font-weight: 600; }
.nx-admin .nx-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 1rem; }
.nx-admin .nx-scroll { overflow-x: auto; }
.nx-admin td a { color: var(--nx-blue); }
.nx-admin .nx-err { color: #b42318; font-size: .8rem; display: block; max-width: 16rem; }

/* Stand laut SSI, Verbinden, Bestätigen (29.10.2026) */
.nx-ssibox { margin: 1rem 0 0; padding: 14px 16px; border: 1px solid var(--nx-line); border-radius: 12px; background: #fff; }
.nx-ssibox.is-warn { background: var(--nx-warn-soft); border-color: #f3d19c; }
.nx-ssibox h3 { margin: 0 0 .6rem; font-size: 1rem; }
.nx-ssibox p { margin: 0 0 .5rem; }
.nx-ssirow { display: grid; grid-template-columns: 9rem 1fr; gap: 2px 12px; align-items: center; margin: 0 0 8px; }
.nx-ssirow__label { color: var(--nx-muted); font-size: .9rem; }
.nx-ssirow__value { font-weight: 600; }
.nx-ssirow .nx-meter__track { grid-column: 2; }
.nx-linkform { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.nx-linkform label { display: grid; gap: 4px; font-size: .88rem; color: var(--nx-muted); }
.nx-linkform input { font: inherit; padding: 7px 10px; border: 1px solid #cfd3dc; border-radius: 8px; min-width: 12rem; box-sizing: border-box; max-width: 100%; }
.nx-btn { font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--nx-blue); background: var(--nx-blue); color: #fff; cursor: pointer; }
.nx-btn:disabled { opacity: .5; cursor: not-allowed; }
.nx-linkbtn { font: inherit; padding: 0; border: 0; background: none; color: var(--nx-blue); text-decoration: underline; cursor: pointer; }
.nx-error { flex-basis: 100%; margin: .4rem 0 0; color: #b42318; font-weight: 600; }
.nx-error:empty { display: none; }
.nx-points { margin: 0 0 .8rem; padding-left: 1.2rem; display: grid; gap: 4px; }
.nx-confirm .nx-tick { margin: 0 0 .8rem; }
.nx-confirm h3 { margin: 0 0 .4rem; }
.nx-confirm .nx-link { display: inline-flex; margin-top: .6rem; }
@media (max-width: 760px) {
  .nx-ssirow { grid-template-columns: 1fr; }
  .nx-ssirow .nx-meter__track { grid-column: 1; }
  .nx-linkform input { min-width: 0; width: 100%; }
  .nx-linkform label { flex: 1 1 100%; }
}
