/*
 * Ghost Tech theme: Receipt
 * Every card is a printed ticket lying on a dark desk: paper, dashed tear lines, a torn lower edge,
 * typewriter headings and codes, and one red stamp colour.
 * Loaded after style.css.
 *
 * Two sets of colours: the desk (the page itself, the menu, the top bar) and the paper (cards, pop-ups,
 * notices). Everything inside a paper element picks up the paper set by itself, because the variables
 * are given new values on that element.
 */
:root {
  /* the desk */
  --paper: #f6f1e4;
  --night: #26272b;
  --fog-1: #303136;
  --fog-2: #3a3b41;
  --line: #55565c;
  --ink: #ece7da;
  --mute: #a9a595;
  --specter: #c8372d;
  --specter-ink: #fff8ee;
  --specter-hi: #a82a22;
  --link: #f6f1e4;
  --candle: #f0c25e;
  --candle-ink: #2a1f05;
  --ok: #8fd6a8;
  --bad: #ff9a85;
  --sans: "DM Sans", "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
  --mono: "Anonymous Pro", "IBM Plex Sans Arabic", ui-monospace, "Courier New", monospace;
  --weight: 400;
  --r-card: 2px;
  --r-ctl: 2px;
  --side: #1d1e21;
  --field: #1d1e21;
  --well: #1d1e21;
  --placeholder: #7d7a70;
  --ok-bg: #1f3329;  --ok-line: #2f6b57;
  --bad-bg: #3a2422; --bad-line: #7a4338; --bad-edge: #a8574a;
  --warn-bg: #33290f; --warn-line: #7a6230; --warn-edge: #a8842f;
  --info-line: #6f7078;
  --backdrop: rgba(10, 10, 12, 0.78);
}
/* the paper */
.card, .stat, .product, .tile, .notice, .dialog, .toast, .table-wrap {
  --night: #ebe5d4;
  --fog-1: var(--paper);
  --fog-2: #d9d2bf;
  --line: #bdb49d;
  --ink: #1c1b19;
  --mute: #6f695b;
  --link: #a82a22;
  --candle: #8a5a00;
  --candle-ink: #fff8ee;
  --ok: #2c6e49;
  --bad: #b3261e;
  --field: #fffdf6;
  --well: #ebe5d4;
  --placeholder: #a39c88;
  --ok-bg: #e3efe0;  --ok-line: #9cc3a5;
  --bad-bg: #f7e1dc; --bad-line: #dba59c; --bad-edge: #c8372d;
  --warn-bg: #f5ead0; --warn-line: #c9ab6a; --warn-edge: #b98a2b;
  --info-line: #8a8474;
  color-scheme: light;
  color: var(--ink);
  background: var(--paper);
}
.card, .stat, .product, .tile { position: relative; border: 0; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3); }
/* the torn lower edge: a row of paper teeth just under the ticket */
.card::after, .stat::after, .product::after, .tile::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-start: 100%; height: 6px; pointer-events: none;
  background: conic-gradient(from -45deg at 50% 100%, var(--paper) 90deg, transparent 0) 0 0 / 12px 6px repeat-x;
}
.card { margin-bottom: 1.6rem; }
/* a list that is not inside a card is a sheet of paper of its own */
.table-wrap:not(.card .table-wrap) { padding: 0.35rem 1rem 0.6rem; border-radius: 2px; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3); }
.notice { border-color: var(--line); }
.notice-warning { background: var(--warn-bg); }
.notice-alert { background: var(--bad-bg); }
.toast { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45); }
a.stat:hover, .tile:hover { background: #fffdf6; }

h2, h3, h4, th, .stat span, .facts dt { font-family: var(--mono); }
.stat strong, .product-meta strong { font-family: var(--mono); font-weight: 700; }
.mark { color: var(--paper); }
.steps li::before { font-family: var(--mono); color: #ff8d80; }
.cat > h3 { color: var(--mute); }
.top { border-bottom-style: dashed; border-bottom-color: var(--line); }
th, td { border-bottom-style: dashed; }
.feed-item, .soon li { border-top-style: dashed; }
.product-meta { padding-top: 0.6rem; border-top: 1px dashed var(--line); }

/* codes and logins: typed in ink inside a dashed box, like the line a clerk fills in */
.feed-item.is-code .feed-code code, .toast code { padding: 0.15rem 0.5rem; background: var(--well); border: 1px dashed var(--line); color: var(--ink); font-weight: 700; }
.cred code, .feed-code code, .token-form input { color: var(--ink); }
.click-here { color: var(--link); }

/* status badges look stamped */
.badge { border-radius: 2px; border-width: 1.5px; font-family: var(--mono); transform: rotate(-1.5deg); }
.count { background: var(--specter); color: var(--specter-ink); }
.btn-primary { letter-spacing: 0.02em; }
:lang(ar) .btn-primary { letter-spacing: 0; }
/* Arabic has no typewriter face: headings and labels stay in the text font */
:lang(ar) h2, :lang(ar) h3, :lang(ar) h4, :lang(ar) th, :lang(ar) .stat span, :lang(ar) .facts dt, :lang(ar) .badge { font-family: var(--sans); }
.balance, .copy, .chips li { border-radius: 2px; }
