/* portal.css — the trinsik portal (platform phase 2), after the Claude Design canvas "trinsik Portal und App-Drawer".
   Tokens from the Trinsik design system: Air ground, Soft Black ink, Senf once per surface, sharp corners,
   hairlines, no shadows. Light by default, dark follows the system unless the person chose light. */
:root {
  --bg: #F8F8F6; --surface: #FFFFFF; --ink: #262623; --muted: #6D6E70; --line: #E8E8E3; --line2: #BEBDAE;
  --accent: #DDCE00; --accent-ink: #262623; --alert: #A85A16;
  --sans: 'Suisse Intl', 'Helvetica Neue', system-ui, sans-serif; --serif: 'GT Alpina', Georgia, serif;
  --mono: 'Suisse Intl Mono', ui-monospace, monospace; --wordmark: 'Adieu', 'Space Grotesk', sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1F1F1D; --surface: #2A2A27; --ink: #F8F8F6; --muted: #BEBDAE; --line: #3E3E39; --line2: #6D6E70;
  --alert: #E6964F; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #1F1F1D; --surface: #2A2A27; --ink: #F8F8F6; --muted: #BEBDAE; --line: #3E3E39;
  --line2: #6D6E70; --alert: #E6964F; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.p-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.p-word { font-family: var(--wordmark); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.p-bracket { font-family: var(--serif); font-weight: 200; font-size: 20px; }
.p-avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--ink); color: var(--bg); display: flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 500; text-decoration: none; }
.p-main { box-sizing: border-box; width: 100%; max-width: 1280px; margin: 0 auto; padding: 40px 24px 64px; display: grid; gap: 44px; overflow-wrap: anywhere; }
.p-main > * { min-width: 0; }
@media (max-width: 600px) { .p-main { padding: 28px 16px 48px; } .p-top { padding: 12px 16px; } }
.p-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.p-hello { margin: 6px 0 0; font-family: var(--serif); font-weight: 200; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
.p-list { border-top: 1px solid var(--ink); display: grid; }
.p-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.p-row:hover .p-text { text-decoration: underline; text-underline-offset: 3px; }
.p-app { width: 84px; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.p-text { flex: 1 1 320px; font-size: 16px; min-width: 0; }
.p-pill { font-size: 12px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); }
.p-pill.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.p-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.p-card { box-sizing: border-box; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line2);
  text-decoration: none; min-height: 180px; }
.p-card:hover { border-color: var(--ink); }
.p-icon { width: 44px; height: 44px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 19px; }
.p-name { font-size: 21px; font-weight: 500; }
.p-desc { font-size: 14px; color: var(--muted); }
.p-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 44px; }
.p-line { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.p-muted { color: var(--muted); font-size: 13px; }
.p-foot { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding: 18px 24px; border-top: 1px solid var(--line);
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0;
  background: var(--accent); color: var(--accent-ink); font: 500 15px var(--sans); text-decoration: none; cursor: pointer; }
.p-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line2); }
.p-btn:focus-visible, .p-card:focus-visible, .p-row:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.p-field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.p-field input, .p-field select { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); padding: 0 12px; font: 15px var(--sans); border-radius: 0; }
.p-field .ro { min-height: 44px; border: 1px dashed var(--line2); padding: 10px 12px; display: flex; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 15px; }
.p-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.p-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.p-table th { text-align: left; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--ink); }
.p-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.p-scroll { overflow-x: auto; }
.p-msg { padding: 10px 14px; border: 1px solid var(--line2); }
.p-msg.bad { border-color: var(--alert); color: var(--alert); }
.p-login { min-height: 100vh; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.p-login > div { padding: 56px clamp(24px, 6vw, 96px); display: flex; flex-direction: column; gap: 28px; }
.p-login .left { justify-content: space-between; border-right: 1px solid var(--line); }
.p-statement { font-family: var(--serif); font-weight: 200; font-size: clamp(40px, 6vw, 72px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
@media (max-width: 720px) { .p-login .left { border-right: 0; border-bottom: 1px solid var(--line); } .p-app { width: auto; } }
.p-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.p-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.p-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.p-tabs a:hover { color: var(--ink); }
.p-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.p-tile { padding: 18px; border: 1px solid var(--line2); background: var(--surface); display: grid; gap: 6px; text-decoration: none; }
.p-kpi { font-family: var(--serif); font-weight: 300; font-size: 34px; line-height: 1; }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '+ '; } details[open] > summary::before { content: '− '; }
.p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
