/* Foundry-specific */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.appcard { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-height: 212px; transition: transform .12s, border-color .12s; }
.appcard:hover { transform: translateY(-2px); border-color: var(--sand-2); }
.appcard.locked { opacity: .72; }
.appcard .head { display: flex; align-items: center; gap: 12px; } .appcard .head .grow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .appcard .head h3 { margin: 0; font-size: 18px; } .appcard .tagline { margin: 0; font-size: 13px; color: var(--ink-2); min-height: 2.6em; line-height: 1.3; }
.appcard .glyph { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; display: grid; place-items: center; color: #282829; background: linear-gradient(145deg, var(--sand), var(--sand-2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.appcard .glyph.live { background: linear-gradient(145deg, var(--sage), color-mix(in srgb, var(--sage) 60%, var(--ok))); color: #1f3d2a; } .appcard .glyph.now { background: linear-gradient(145deg, var(--walnut), var(--walnut-2)); color: #f1ede6; }
.appcard .glyph.next, .appcard .glyph.later { background: var(--paper); color: var(--ink-3); border: 1px dashed var(--line); }
.appcard .mods { display: flex; flex-wrap: wrap; gap: 6px; }
.appcard .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.hero .quote { font-family: var(--font-head); font-size: 20px; line-height: 1.35; color: var(--ink-2); }
.feed li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed .t { color: var(--ink-3); min-width: 110px; font-variant-numeric: tabular-nums; }
.rolegrid td select { min-width: 120px; }
.me { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sand); color: #282829; display: grid; place-items: center; font-weight: 500; font-size: 12px; }
.foundation { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .foundation { grid-template-columns: 1fr; } }

.tier { margin-bottom: 22px; } .tier-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.appcard .glyph.later { background: var(--paper); color: var(--ink-3); border: 1px dashed var(--line); }

.appcard .mods { align-self: start; } .appcard .mods .badge { font-size: 10px; }
.oicon { display: block; }

/* ---- final logos (shared/logos.js): sidebar mark on the dark rail, wordmark lockup on login, app marks in the launcher glyph */
.brand .logo.mark { background: transparent; color: #f1ede6; padding: 0; display: grid; place-items: center; }
.ologo { display: block; }
.login .wordmark { display: flex; justify-content: center; color: var(--ink); margin: -18px 0 -8px; } .login .wordmark svg { width: 200px; height: 200px; }
.appcard .glyph .ologo { width: 40px; height: 40px; }
/* ---- hub nav */
.nav button svg { flex: 0 0 auto; opacity: .85; }
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main, .side { min-width: 0; max-width: 100vw; overflow-x: hidden; }
  .side { padding: 12px 14px; }
  .brand { padding-bottom: 8px; }
  .nav { display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .nav button { width: auto; white-space: nowrap; padding: 7px 10px; font-size: 13px; }
  .side .bottom { margin-top: 8px; padding-top: 8px; }
}
.side-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: #bdb6aa; white-space: nowrap; overflow: hidden; } .side-meta span:last-child { overflow: hidden; text-overflow: ellipsis; }
.crown { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: #b08a3c; }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); font-size: 13px; border: 1px dashed var(--line); border-radius: var(--radius); }
.toolbar { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar label.f { min-width: 120px; } .toolbar input, .toolbar select { width: auto; min-width: 120px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; cursor: pointer; color: var(--ink-2); font-weight: 400; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--walnut); }
.chips-row { display: flex; flex-wrap: wrap; gap: 4px; } .chips-row .badge { font-size: 10px; }
.chip-input { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--paper-2); }
.chip-input input { border: 0; flex: 1; min-width: 160px; padding: 4px; } .chip-input input:focus { outline: none; }
.chip-input .badge button { border: 0; background: transparent; cursor: pointer; padding: 0 0 0 4px; color: inherit; font-size: 12px; line-height: 1; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (max-width: 600px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; } .tile .v { font-family: var(--font-head); font-size: 28px; line-height: 1.1; } .tile .l { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.chart { width: 100%; height: auto; display: block; } .chart text { font-family: var(--font-body); font-size: 10px; fill: var(--ink-3); } .chart .guard { stroke: var(--bad); stroke-dasharray: 4 3; }
.chart rect.seg, .chart path.area { cursor: pointer; } .chart rect.seg:hover, .chart path.area:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-2); margin: 6px 0; } .legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 5px; vertical-align: -1px; }
.legend button { background: transparent; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; } .legend button::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 5px; vertical-align: -1px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pcard { cursor: pointer; } .pcard:hover { border-color: var(--sand-2); } .pcard .spark { width: 100%; height: 44px; }
.drill { border-left: 3px solid var(--walnut); }
.sect-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; flex-wrap: wrap; } .sect-h h3 { margin: 0; }
/* ---- vault: dark walnut treatment */
.vault-hero { background: linear-gradient(135deg, #473729, #2c221a); color: #f1ede6; border-radius: 14px; padding: 18px 20px; display: flex; gap: 14px; align-items: center; margin-bottom: 16px; box-shadow: var(--shadow); }
.vault-hero .lockglyph { width: 52px; height: 52px; border-radius: 14px; background: rgba(221,203,164,.18); display: grid; place-items: center; color: #ddcba4; flex: 0 0 52px; }
.vault-hero h2 { color: #f1ede6; margin: 0; } .vault-hero p { margin: 4px 0 0; color: #d9d4ca; font-size: 13px; }
.vault-table th { background: #473729; color: #e9dcc6; } .vault-table th:first-child { border-top-left-radius: 8px; } .vault-table th:last-child { border-top-right-radius: 8px; }
.vault-table td .name { font-weight: 500; } .vault-table td .platform { text-transform: capitalize; }
.secret { font-family: var(--mono); font-size: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; word-break: break-all; }
.secret .k { font-size: 11px; color: var(--ink-3); font-family: var(--font-body); } .secret .v { flex: 1; }
.modal.vault-modal { border-top: 4px solid #473729; }
.about { max-width: 780px; } .about h1 { font-size: 30px; margin: 8px 0 12px; } .about h2 { font-size: 22px; margin: 22px 0 8px; } .about h3 { margin: 16px 0 6px; } .about p, .about li { color: var(--ink-2); line-height: 1.55; } .about ul, .about ol { padding-left: 22px; } .about a { text-decoration: underline; text-underline-offset: 2px; }
.rules-table td .badge { text-transform: none; }
.events-help { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; } .events-help .card { padding: 12px 14px; } .events-help code { display: inline-block; background: var(--paper); padding: 1px 6px; border-radius: 4px; }
.mini-table td, .mini-table th { padding: 5px 8px; font-size: 12px; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; } @media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
/* Foundry-specific */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.appcard { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-height: 212px; transition: transform .12s, border-color .12s; }
.appcard:hover { transform: translateY(-2px); border-color: var(--sand-2); }
.appcard.locked { opacity: .72; }
.appcard .head { display: flex; align-items: center; gap: 12px; } .appcard .head .grow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .appcard .head h3 { margin: 0; font-size: 18px; } .appcard .tagline { margin: 0; font-size: 13px; color: var(--ink-2); min-height: 2.6em; line-height: 1.3; }
.appcard .glyph { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; display: grid; place-items: center; color: #282829; background: linear-gradient(145deg, var(--sand), var(--sand-2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.appcard .glyph.live { background: linear-gradient(145deg, var(--sage), color-mix(in srgb, var(--sage) 60%, var(--ok))); color: #1f3d2a; } .appcard .glyph.now { background: linear-gradient(145deg, var(--walnut), var(--walnut-2)); color: #f1ede6; }
.appcard .glyph.next, .appcard .glyph.later { background: var(--paper); color: var(--ink-3); border: 1px dashed var(--line); }
.appcard .mods { display: flex; flex-wrap: wrap; gap: 6px; }
.appcard .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.hero .quote { font-family: var(--font-head); font-size: 20px; line-height: 1.35; color: var(--ink-2); }
.feed li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed .t { color: var(--ink-3); min-width: 110px; font-variant-numeric: tabular-nums; }
.rolegrid td select { min-width: 120px; }
.me { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sand); color: #282829; display: grid; place-items: center; font-weight: 500; font-size: 12px; }
.foundation { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .foundation { grid-template-columns: 1fr; } }

.tier { margin-bottom: 22px; } .tier-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.appcard .glyph.later { background: var(--paper); color: var(--ink-3); border: 1px dashed var(--line); }

.appcard .mods { align-self: start; } .appcard .mods .badge { font-size: 10px; }
.oicon { display: block; }

/* ---- final logos (shared/logos.js): sidebar mark on the dark rail, wordmark lockup on login, app marks in the launcher glyph */
.brand .logo.mark { background: transparent; color: #f1ede6; padding: 0; display: grid; place-items: center; }
.ologo { display: block; }
.login .wordmark { display: flex; justify-content: center; color: var(--ink); margin: -18px 0 -8px; } .login .wordmark svg { width: 200px; height: 200px; }
.appcard .glyph .ologo { width: 40px; height: 40px; }
/* ---- hub nav */
.nav button svg { flex: 0 0 auto; opacity: .85; }
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main, .side { min-width: 0; max-width: 100vw; overflow-x: hidden; }
  .side { padding: 12px 14px; }
  .brand { padding-bottom: 8px; }
  .nav { display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .nav button { width: auto; white-space: nowrap; padding: 7px 10px; font-size: 13px; }
  .side .bottom { margin-top: 8px; padding-top: 8px; }
}
.side-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: #bdb6aa; white-space: nowrap; overflow: hidden; } .side-meta span:last-child { overflow: hidden; text-overflow: ellipsis; }
.crown { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: #b08a3c; }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); font-size: 13px; border: 1px dashed var(--line); border-radius: var(--radius); }
.toolbar { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar label.f { min-width: 120px; } .toolbar input, .toolbar select { width: auto; min-width: 120px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; cursor: pointer; color: var(--ink-2); font-weight: 400; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--walnut); }
.chips-row { display: flex; flex-wrap: wrap; gap: 4px; } .chips-row .badge { font-size: 10px; }
.chip-input { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--paper-2); }
.chip-input input { border: 0; flex: 1; min-width: 160px; padding: 4px; } .chip-input input:focus { outline: none; }
.chip-input .badge button { border: 0; background: transparent; cursor: pointer; padding: 0 0 0 4px; color: inherit; font-size: 12px; line-height: 1; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (max-width: 600px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; } .tile .v { font-family: var(--font-head); font-size: 28px; line-height: 1.1; } .tile .l { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.chart { width: 100%; height: auto; display: block; } .chart text { font-family: var(--font-body); font-size: 10px; fill: var(--ink-3); } .chart .guard { stroke: var(--bad); stroke-dasharray: 4 3; }
.chart rect.seg, .chart path.area { cursor: pointer; } .chart rect.seg:hover, .chart path.area:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-2); margin: 6px 0; } .legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 5px; vertical-align: -1px; }
.legend button { background: transparent; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; } .legend button::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 5px; vertical-align: -1px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pcard { cursor: pointer; } .pcard:hover { border-color: var(--sand-2); } .pcard .spark { width: 100%; height: 44px; }
.drill { border-left: 3px solid var(--walnut); }
.sect-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; flex-wrap: wrap; } .sect-h h3 { margin: 0; }
/* ---- vault: dark walnut treatment */
.vault-hero { background: linear-gradient(135deg, #473729, #2c221a); color: #f1ede6; border-radius: 14px; padding: 18px 20px; display: flex; gap: 14px; align-items: center; margin-bottom: 16px; box-shadow: var(--shadow); }
.vault-hero .lockglyph { width: 52px; height: 52px; border-radius: 14px; background: rgba(221,203,164,.18); display: grid; place-items: center; color: #ddcba4; flex: 0 0 52px; }
.vault-hero h2 { color: #f1ede6; margin: 0; } .vault-hero p { margin: 4px 0 0; color: #d9d4ca; font-size: 13px; }
.vault-table th { background: #473729; color: #e9dcc6; } .vault-table th:first-child { border-top-left-radius: 8px; } .vault-table th:last-child { border-top-right-radius: 8px; }
.vault-table td .name { font-weight: 500; } .vault-table td .platform { text-transform: capitalize; }
.secret { font-family: var(--mono); font-size: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; word-break: break-all; }
.secret .k { font-size: 11px; color: var(--ink-3); font-family: var(--font-body); } .secret .v { flex: 1; }
.modal.vault-modal { border-top: 4px solid #473729; }
.about { max-width: 780px; } .about h1 { font-size: 30px; margin: 8px 0 12px; } .about h2 { font-size: 22px; margin: 22px 0 8px; } .about h3 { margin: 16px 0 6px; } .about p, .about li { color: var(--ink-2); line-height: 1.55; } .about ul, .about ol { padding-left: 22px; } .about a { text-decoration: underline; text-underline-offset: 2px; }
.rules-table td .badge { text-transform: none; }
.events-help { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; } .events-help .card { padding: 12px 14px; } .events-help code { display: inline-block; background: var(--paper); padding: 1px 6px; border-radius: 4px; }
.mini-table td, .mini-table th { padding: 5px 8px; font-size: 12px; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; } @media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }


/* dark theme: app marks must stay legible on their tiles */
:root[data-theme="dark"] .appcard .glyph.live { background: linear-gradient(145deg, #2f4a3a, #3d5c48); color: #e6efe8; }
:root[data-theme="dark"] .appcard .glyph.now { background: linear-gradient(145deg, #684934, #8a6448); color: #f6efe3; }
:root[data-theme="dark"] .appcard .glyph:not(.live):not(.now):not(.next):not(.later) { background: linear-gradient(145deg, #c2a57f, #ddcba4); color: #2a2118; }
:root[data-theme="dark"] .appcard .glyph.next, :root[data-theme="dark"] .appcard .glyph.later { background: #242426; color: #cfc9bf; border-color: #4a4a4c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .appcard .glyph.live { background: linear-gradient(145deg, #2f4a3a, #3d5c48); color: #e6efe8; }
  :root:not([data-theme="light"]) .appcard .glyph.now { background: linear-gradient(145deg, #684934, #8a6448); color: #f6efe3; }
  :root:not([data-theme="light"]) .appcard .glyph:not(.live):not(.now):not(.next):not(.later) { background: linear-gradient(145deg, #c2a57f, #ddcba4); color: #2a2118; }
  :root:not([data-theme="light"]) .appcard .glyph.next, :root:not([data-theme="light"]) .appcard .glyph.later { background: #242426; color: #cfc9bf; border-color: #4a4a4c; }
}
