/* Shared website components. Product application mockups keep their own controls. */
:root {
  --k-paper:#f4efe5; --k-surface:#fffefb; --k-ink:#201d19; --k-muted:#5a5348;
  --k-orange:#c44b25; --k-orange-dark:#8b2f12; --k-blue:#1c3254;
  --k-border:rgba(110,94,74,.34); --k-ease:cubic-bezier(.22,1,.36,1);
}
.k-sub-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.k-sub-header__identity { display:inline-flex; align-items:center; gap:12px; min-width:0; }
.k-sub-header__identity > img { flex:none; object-fit:contain; }
.k-sub-header__actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.k-identity__text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.k-identity__text strong { font-size:24px; line-height:1.1; font-weight:900; }
.k-identity__text small, .k-identity__text span { color:#766c5e; font-size:13px; line-height:1.35; font-weight:650; }

.k-home-nav { display:flex; align-items:center; gap:4px; padding:6px; border:1px solid #d9cebf; border-radius:12px; background:rgba(253,251,245,.96); box-shadow:0 3px 0 rgba(77,63,46,.12); }
.k-home-nav a { display:inline-flex; align-items:center; min-height:44px; padding:0 17px; border-radius:8px; color:#24211c; font-size:16px; font-weight:800; text-decoration:none; white-space:nowrap; }
.k-home-nav a:hover { background:#eee7da; }
.k-home-nav a[aria-current="true"] { background:#2b2620; color:#fffdf8; }
.k-home-menu { display:none; position:relative; }
.k-home-menu summary { list-style:none; display:flex; align-items:center; gap:8px; min-height:46px; padding:0 16px; border:1px solid #d9cebf; border-radius:10px; background:#fdfbf5; box-shadow:0 2px 0 rgba(77,63,46,.18); font-size:16px; font-weight:800; cursor:pointer; }
.k-home-menu summary::-webkit-details-marker { display:none; }
.k-home-menu nav { position:absolute; z-index:50; right:0; top:54px; display:grid; gap:2px; min-width:184px; padding:8px; background:#fffdf9; border:1px solid #d8cebe; border-radius:10px; box-shadow:0 4px 8px rgba(42,34,26,.14); }
.k-home-menu nav a { min-height:46px; padding:12px 14px; border-radius:7px; color:#24211c; text-decoration:none; font-size:16px; font-weight:750; }
.k-home-menu nav a:hover { background:#f0eadf; }
.k-home-menu nav a[aria-current="true"] { background:#2b2620; color:#fffdf8; }

.k-button { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:46px; padding:10px 18px; border:1.5px solid var(--k-border); border-radius:10px; background:var(--k-surface); color:var(--k-ink); font:inherit; font-size:14px; font-weight:800; line-height:1.25; text-align:center; text-decoration:none; cursor:pointer; box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 3px 0 rgba(104,88,68,.25); transition:transform 150ms var(--k-ease),box-shadow 150ms var(--k-ease),background 150ms var(--k-ease),border-color 150ms var(--k-ease); }
.k-button:hover { background:#fff; border-color:rgba(110,94,74,.55); }
.k-button:active { transform:translateY(2px); box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 1px 0 rgba(104,88,68,.25); }
.k-button--primary { --k-button-fill:#c44b25; --k-button-edge:#8b2f12; --k-button-hover:#aa3e1c; min-height:56px; padding:12px 24px; border-color:var(--k-button-edge); font-size:16px; background:var(--k-button-fill); color:#fffefb; box-shadow:inset 0 1.5px 0 rgba(255,255,255,.36),0 4px 0 var(--k-button-edge); }
.k-button--blue { --k-button-fill:#0875dc; --k-button-edge:#0752a2; --k-button-hover:#0667c5; }
.k-button--primary:hover { background:var(--k-button-hover); border-color:var(--k-button-edge); }
.k-button--primary:active { transform:translateY(3px); box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 var(--k-button-edge); }
.k-button--small { min-height:34px; padding:5px 10px; border-radius:8px; font-size:12px; }
.k-button__studs { display:grid; gap:4px; flex:none; }
.k-button__studs i { display:block; width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.4); box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 1px 0 rgba(0,0,0,.24); }
.k-button:disabled, .k-button[aria-disabled="true"] { opacity:.5; cursor:not-allowed; transform:none; }

.k-author { display:inline-flex; flex:none; align-items:center; gap:8px; min-height:38px; padding:5px 14px 5px 7px; border:1.5px solid var(--k-border); border-radius:9px; background:var(--k-surface); color:var(--k-ink); font-size:13.5px; font-weight:800; line-height:1.55; text-decoration:none; white-space:nowrap; box-shadow:0 2px 0 rgba(104,88,68,.2); }
.k-author:hover { background:#fff; border-color:var(--k-orange); }
.k-author:active, .k-header-action:active, .k-filter:active, .k-to-top:active { transform:translateY(2px); box-shadow:none; }
.k-author img { display:block; width:25px; height:25px; border-radius:50%; object-fit:cover; }
.k-author i { font-style:normal; color:var(--k-orange); font-weight:900; }
.k-header-action { display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:6px 14px; border:1px solid #10213a; border-radius:9px; background:var(--k-blue); color:#fffefb; font-size:13.5px; font-weight:850; text-decoration:none; white-space:nowrap; box-shadow:0 2px 0 #101f36; }
.k-header-action:hover { background:#142540; }
.k-brand { display:inline-flex; align-items:center; gap:8px; padding:6px 13px; border:1.5px solid var(--k-border); border-radius:9px; background:var(--k-surface); box-shadow:0 2px 0 rgba(104,88,68,.18); }
.k-brand__dot { width:10px; height:10px; border-radius:3px; background:var(--k-orange); box-shadow:0 2px 0 rgba(140,48,20,.35); }
.k-brand__license { padding:2px 4px; color:var(--k-orange); font-size:11.5px; font-weight:850; white-space:nowrap; }

.k-entry { border:1px solid rgba(120,102,82,.28); border-radius:13px; background:var(--k-surface); box-shadow:0 2px 0 rgba(72,59,42,.08); color:var(--k-ink); text-decoration:none; transition:background 180ms var(--k-ease),border-color 180ms var(--k-ease); }
.k-entry:hover { background:#fff; border-color:rgba(140,88,62,.55); }
.k-entry__row, button.k-entry { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:13px; width:100%; min-height:78px; padding:13px 16px; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.k-entry__row { border:0; border-radius:inherit; background:transparent; }
.k-entry__row::-webkit-details-marker { display:none; }
.k-entry__icon { display:grid; place-items:center; width:44px; height:44px; border-radius:9px; background:#ebe0cc; font-weight:850; }
.k-entry__icon img { max-width:100%; max-height:100%; object-fit:contain; }
.k-entry__body { min-width:0; }
.k-entry__title, .k-entry__detail { display:block; }
.k-entry__title { font-size:18px; line-height:1.3; font-weight:800; }
.k-entry__detail { margin-top:4px; color:var(--k-muted); font-size:14px; line-height:1.4; font-weight:600; }
.k-entry__indicator { color:var(--k-orange); font-size:13px; font-weight:800; line-height:1.25; white-space:nowrap; }
/* Decorative brick: the whole row remains the single interactive target. */
.k-entry__action { display:grid; place-items:center; width:24px; height:19px; border:1px solid var(--k-orange-dark); border-radius:5px; background:var(--k-orange); box-shadow:inset 0 1px 0 rgba(255,255,255,.3), 0 2px 0 var(--k-orange-dark); }
.k-entry__action::before { content:""; width:9px; height:9px; border-radius:50%; background:#de7957; box-shadow:inset 0 1px 0 rgba(255,255,255,.55), 0 1px 0 rgba(92,33,16,.5); }
.k-entry--disclosure .k-entry__indicator { display:inline-block; color:var(--k-orange); font-size:20px; transition:transform 180ms var(--k-ease); }
.k-entry--disclosure[open] { border-color:rgba(140,88,62,.48); }
.k-entry--disclosure[open] .k-entry__indicator { transform:rotate(45deg); }

.k-filter { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:36px; padding:5px 12px; border:1.5px solid var(--k-border); border-radius:8px; background:var(--k-surface); color:var(--k-muted); font:inherit; font-size:13px; font-weight:800; line-height:1.3; cursor:pointer; box-shadow:0 2px 0 rgba(104,88,68,.2); transition:transform 140ms var(--k-ease),background 140ms var(--k-ease),color 140ms var(--k-ease),border-color 140ms var(--k-ease); }
.k-filter:hover { border-color:rgba(110,94,74,.55); }
.k-filter:is(.is-active,[aria-pressed="true"],[aria-selected="true"]) { background:var(--k-orange); border-color:var(--k-orange-dark); color:#fffefb; box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 2px 0 var(--k-orange-dark); }
.k-filter--blue:is(.is-active,[aria-pressed="true"],[aria-selected="true"]) { background:#0875dc; border-color:#0752a2; box-shadow:0 2px 0 #0752a2; }
.k-filter small { font-size:.85em; }
.k-filter:disabled { opacity:.5; cursor:not-allowed; }

.k-chapter { padding:24px; border:1px solid rgba(120,102,82,.25); border-radius:14px; background:rgba(253,251,245,.96); color:#221f1a; box-shadow:0 3px 0 rgba(72,59,42,.08); }
.k-chapter__eyebrow { margin:0 0 10px; color:#8f4d34; font-size:13px; font-weight:850; letter-spacing:.09em; }
.k-chapter__title { margin:0 0 12px; font-size:clamp(30px,4vw,48px); font-weight:850; line-height:1.1; letter-spacing:-.04em; }
.k-chapter__title span { color:var(--k-orange); }
.k-chapter__description { margin:0 0 18px; color:#3f3a32; font-size:17px; line-height:1.6; font-weight:650; }

.k-to-top { position:fixed; z-index:45; right:max(24px,env(safe-area-inset-right)); bottom:max(24px,env(safe-area-inset-bottom)); display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:8px 16px; border:1px solid #101f36; border-radius:9px; background:var(--k-blue); color:#fffefb; font:850 13.5px/1.55 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; text-decoration:none; box-shadow:0 2px 0 #101f36; cursor:pointer; }
.k-to-top[hidden] { display:none !important; }
.k-to-top:hover { background:var(--k-orange); }
.k-to-top--home { right:auto; left:max(24px,env(safe-area-inset-left)); }
:is(.k-button,.k-filter,.k-author,.k-entry,.k-entry__row,.k-header-action,.k-to-top,.k-home-nav a,.k-home-menu summary,.k-home-menu nav a):focus-visible { outline:3px solid var(--k-orange); outline-offset:3px; }
@media (max-width:760px) {
  .k-home-nav { display:none; }
  .k-home-menu { display:block; }
  .k-entry__row, button.k-entry { min-height:72px; }
  .k-identity__text strong { font-size:20px; }
  .k-identity__text small, .k-identity__text span { font-size:12px; }
  .k-to-top--home { left:max(16px,env(safe-area-inset-left)); bottom:max(72px,env(safe-area-inset-bottom)); }
}
@media (max-width:680px) {
  .k-filter--compact { min-height:32px; padding:4px 8px; font-size:11px; }
  .k-filter--segment { min-height:32px; padding:4px 6px; font-size:10px; }
  .k-sub-header__actions { gap:5px; }
  .k-author--compact { gap:4px; min-height:36px; padding:4px 7px 4px 4px; font-size:10.5px; }
  .k-author--compact img { width:21px; height:21px; }
  .k-header-action--compact { min-height:36px; gap:3px; padding:5px 8px; font-size:10.5px; }
  .k-brand--compact { gap:4px; padding:5px 7px; }
  .k-brand--compact .k-brand__dot { width:7px; height:7px; }
  .k-brand--compact strong { font-size:12px; }
  .k-brand--compact .k-brand__license { font-size:9px; }
  .k-to-top:not(.k-to-top--home) { right:max(16px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom)); }
}
@media (max-width:420px) { .k-brand--compact { gap:3px; } }
@media (prefers-reduced-motion:reduce) { .k-button,.k-entry,.k-filter,.k-entry__indicator { transition:none; } }
