/* Warranty Keeper: cada garantía es un ticket de caja con talón perforado y un sello de estado.
   Tipografía: IBM Plex Mono (todo el ticket) + Instrument Sans (formularios). Tinta azul y sello rojo. */
:root {
  --font-body: "Instrument Sans", system-ui, sans-serif; --font-figure: "IBM Plex Mono", ui-monospace, monospace;
  --paper: #e9e6dd; --surface: #fffdf6; --card: #fffdf6; --ink: #1b2a4a; --ink-soft: #57607a; --line: #c9c3b1;
  --accent: #1b3d8f; --accent-ink: #fff; --ok: #1b3d8f; --soon: #a65a00; --urgent: #b3261e; --minus: #b3261e; --plus: #1b3d8f; --radius: 6px;
}
@media (prefers-color-scheme: dark) { :root {
  --paper: #14161d; --surface: #1e212b; --card: #1e212b; --ink: #e4e8f5; --ink-soft: #a0a8c0; --line: #343949;
  --accent: #8fa8ff; --accent-ink: #101524; --ok: #8fa8ff; --soon: #f0b45a; --urgent: #ff8f85; --minus: #ff8f85; --plus: #8fa8ff;
} }
.shell { max-width: 680px; }
.site-head h1 { font-family: var(--font-figure); font-weight: 600; letter-spacing: -0.03em; text-transform: uppercase; }
.lead, .hint, .summary { color: var(--ink-soft); font-family: var(--font-figure); font-size: 0.9rem; }
.finder { display: grid; gap: 0.6rem; margin: 0.75rem 0 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chipro { border-radius: 999px; background: var(--card); }
.chipro[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.tickets { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1rem; }
.ticket { position: relative; display: grid; grid-template-columns: 1fr auto; background: var(--card); color: var(--ink); font-family: var(--font-figure); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 0 var(--line);
  -webkit-mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; }
.t-main { padding: 0.9rem 1rem 0.8rem 1.2rem; display: grid; gap: 0.3rem; min-width: 0; }
.t-name { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.02em; }
.t-sub { color: var(--ink-soft); font-size: 0.82rem; overflow-wrap: anywhere; }
.t-lines { margin: 0.3rem 0 0; display: grid; gap: 0.1rem; font-size: 0.85rem; }
.t-lines div { display: flex; gap: 0.4rem; align-items: baseline; }
.t-lines dt { color: var(--ink-soft); flex: none; }
.t-lines dt::after { content: ""; }
.t-lines dd { margin: 0; flex: 1; text-align: right; border-bottom: 1px dotted var(--line); order: 3; }
.t-lines div::before { content: none; }
.t-lines dt { order: 1; } .t-lines dd { order: 2; border: 0; text-align: left; font-weight: 600; }
.t-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.t-stub { border-left: 2px dashed var(--line); padding: 0.9rem 1.2rem 0.9rem 0.9rem; display: grid; align-content: center; justify-items: center; gap: 0.6rem; min-width: 7.5rem; text-align: center; }
.stamp { border: 2px solid var(--stamp, var(--ok)); color: var(--stamp, var(--ok)); border-radius: 4px; padding: 0.15rem 0.45rem; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; transform: rotate(-6deg); opacity: 0.92; white-space: nowrap; }
.days { font-size: 0.8rem; color: var(--ink-soft); }
.ticket.ok { --stamp: var(--ok); } .ticket.soon, .ticket.today { --stamp: var(--soon); } .ticket.expired { --stamp: var(--urgent); }
.ticket.expired .t-name { text-decoration: line-through; text-decoration-thickness: 1px; opacity: 0.8; }
@media (max-width: 420px) { .ticket { grid-template-columns: 1fr; } .t-stub { border-left: 0; border-top: 2px dashed var(--line); grid-auto-flow: column; justify-content: space-between; padding: 0.7rem 1.2rem; } }

.add-wrap { margin: 1rem 0; } .add-wrap summary { cursor: pointer; font-family: var(--font-figure); }
.viewer { width: min(94vw, 560px); border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); padding: 1rem; }
.viewer::backdrop { background: rgba(0, 0, 0, 0.6); }
.viewer img { max-width: 100%; max-height: 65vh; display: block; margin: 0 auto 0.75rem; }
.tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
input[type="search"], input[type="date"] { width: 100%; min-height: 44px; padding: 0.5rem 0.7rem; font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.attach { position: relative; cursor: pointer; }
.attach input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.attach:focus-within { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.t-actions .small { font-family: var(--font-figure); min-height: 40px; }

.t-lines .ret dd { color: var(--soon); font-weight: 700; }
