/* tender.analitik.my — tokens from docs/design-charter.md §4 */
@font-face {
  font-family: "Funnel Sans";
  src: url("/fonts/funnel-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
:root {
  --canvas: #ffffff;
  --ink: #1b1d1f;
  --ink-2: #4a4e53;
  --ink-3: #6b6f75;
  --rule: #e3e4e5;
  --rule-2: #c9cbcd;
  --kraft: #b0772b;
  --kraft-ink: #7d521a;
  --kraft-wash: #f6eee3;
  --past: #c9cbcd;
  --r-ctl: 2px;
  --gut: 24px;
  --max: 1200px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 16px/1.5 "Funnel Sans", ui-sans-serif, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; margin: 0; }

.mast, main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.mast { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.mark .dim { color: var(--ink-3); font-weight: 500; }
.src { margin: 0; color: var(--ink-3); font-size: 14px; }

/* first frame: the sentence + the closing calendar */
.top { padding: 36px 0 8px; }
.top h1 { font-size: 17px; font-weight: 600; letter-spacing: 0; margin: 0 0 14px; color: var(--ink-2); }
.lede { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; font-weight: 450; letter-spacing: -0.02em; margin: 0; max-width: 30ch; }
.lede strong { font-weight: 750; }
.lede .soon strong { color: var(--kraft-ink); }
.sub { color: var(--ink-2); margin: 14px 0 0; max-width: 72ch; }

.cal { margin: 32px 0 0; }
.cal figcaption { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; color: var(--ink-3); font-size: 14px; margin-bottom: 10px; }
.cal .reset { color: var(--ink); }
.cols { display: flex; align-items: flex-end; gap: 2px; padding-top: 28px; overflow-x: auto; scrollbar-width: thin; }
.col {
  position: relative; flex: 1 0 22px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end;
  text-decoration: none; min-height: 290px; padding-bottom: 2px;
}
.col .n { font-size: 12px; text-align: center; color: var(--ink-2); height: 18px; line-height: 18px; }
.col .stack {
  display: block; height: calc(var(--t) * var(--pitch)); margin: 0 2px;
  background: repeating-linear-gradient(to top, var(--tick) 0 2px, transparent 2px var(--pitch));
  position: relative;
}
.col .cap { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--canvas); border-top: 2px dotted var(--ink-3); }
.col .d { font-size: 13px; text-align: center; font-weight: 600; margin-top: 6px; border-top: 1px solid var(--rule-2); padding-top: 4px; }
.col .w { font-size: 11px; text-align: center; color: var(--ink-3); height: 16px; }
.col .mo { position: absolute; top: -26px; left: 2px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.col.wkd .d { color: var(--ink-3); font-weight: 400; }
.col { --tick: var(--ink); }
.col.soon { --tick: var(--kraft); }
.col.soon .n { color: var(--kraft-ink); font-weight: 600; }
.col.past, .col.later { flex-basis: 44px; flex-grow: 1.6; }
.col.past { --tick: var(--past); margin-right: 10px; }
.col.past .d, .col.later .d { font-weight: 500; color: var(--ink-3); }
.col.later { margin-left: 10px; }
.col.dim { opacity: 0.28; }
@media (hover: hover) and (pointer: fine) {
  .col:hover { opacity: 1; }
  .col:hover .d { border-top-color: var(--ink); border-top-width: 2px; padding-top: 3px; }
}

/* comparisons */
.compare { padding: 56px 0 8px; }
.cmp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.measure { display: inline-flex; border: 1px solid var(--rule-2); border-radius: var(--r-ctl); }
.measure a { padding: 6px 12px; font-size: 14px; text-decoration: none; color: var(--ink-2); }
.measure a + a { border-left: 1px solid var(--rule-2); }
.measure a[aria-current] { background: var(--ink); color: var(--canvas); }
.basis { color: var(--ink-2); font-size: 15px; max-width: 72ch; margin: 10px 0 0; }
.basis em { font-style: normal; font-weight: 600; color: var(--ink); }

table.cmp { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 15px; }
table.cmp caption { text-align: left; padding-bottom: 8px; }
.cap-t { font-size: 17px; font-weight: 650; }
table.cmp th, table.cmp td { padding: 6px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; text-align: left; }
table.cmp thead th { font-size: 13px; font-weight: 500; color: var(--ink-3); border-bottom-color: var(--rule-2); vertical-align: bottom; }
table.cmp tbody th { font-weight: 500; min-width: 180px; }
table.cmp tbody th a { text-decoration: none; }
table.cmp tbody th a:hover { text-decoration: underline; }
table.cmp .full { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
table.cmp tr.on th a { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
table.cmp tr.on { background: #f4f4f5; }
.num { text-align: right !important; white-space: nowrap; }
td.soon { color: var(--kraft-ink); font-weight: 600; }
td.price .of { color: var(--ink-3); font-size: 13px; }
.nil { color: var(--ink-3); }
td.bars { width: 150px; padding-top: 4px; padding-bottom: 4px; }
.yb { display: block; }
.ch { font-size: 14px; color: var(--ink-2); }
.ch.up, .ch.dn { color: var(--ink); font-weight: 600; }
table.mi tbody tr.more { display: none; }
table.mi.all tbody tr.more { display: table-row; }
.morebtn { margin: 12px 0 0; }
.morebtn a { display: inline-block; padding: 8px 14px; border: 1px solid var(--ink); border-radius: var(--r-ctl); text-decoration: none; font-weight: 600; font-size: 15px; }
.morebtn a:active { transform: scale(0.97); }

/* list */
.list { padding: 56px 0 8px; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto auto; gap: 12px; align-items: end; margin-top: 18px; padding: 14px; border: 1px solid var(--rule-2); }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-3); min-width: 0; }
.filters input, .filters select, .filters button {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--canvas);
  border: 1px solid var(--rule-2); border-radius: var(--r-ctl); padding: 8px 10px; min-height: 40px; min-width: 0; width: 100%;
}
.filters button { background: var(--ink); color: var(--canvas); border-color: var(--ink); font-weight: 600; cursor: pointer; width: auto; }
.filters button:active { transform: scale(0.97); }
.filters .reset { font-size: 14px; padding-bottom: 10px; white-space: nowrap; }
.calls { list-style: none; margin: 18px 0 0; padding: 0; }
.calls li { display: grid; grid-template-columns: 128px 1fr auto; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.calls .when { display: flex; flex-direction: column; }
.calls .when time { font-weight: 650; }
.calls .when span { font-size: 13px; color: var(--ink-3); }
.calls li.soon .when { border-left: 3px solid var(--kraft); padding-left: 9px; margin-left: -12px; }
.calls li.soon .when span { color: var(--kraft-ink); font-weight: 600; }
.calls li.gone { color: var(--ink-3); }
.calls .what a { font-weight: 500; text-decoration: none; display: block; max-width: 80ch; overflow-wrap: anywhere; }
.calls .what a:hover { text-decoration: underline; }
.calls p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.calls .meta { color: var(--ink-3); font-size: 13px; }
.code { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.calls .price { font-weight: 650; white-space: nowrap; text-align: right; }
.empty { padding: 28px 0; color: var(--ink-2); }

.about { padding: 56px 0 48px; border-top: 1px solid var(--rule); margin-top: 56px; }
.about p { max-width: 72ch; color: var(--ink-2); }
.about .publisher { color: var(--ink); }

/* sibling sites + footer: outside main, like geo.analitik.my; tiles are links, so a bordered box is allowed (charter §4 shape) */
.sibs-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.sibs { margin-top: 8px; }
.sibs h2 { padding-top: 18px; border-top: 2px solid var(--ink); margin-bottom: 14px; }
.sibs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sibs li { display: flex; }
.sib { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 14px 16px 12px; border: 1px solid var(--rule-2); color: var(--ink); text-decoration: none; }
.sib-name { font-weight: 650; font-size: 17px; line-height: 1.25; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sib-desc { font-size: 14px; line-height: 1.45; color: var(--ink-2); flex: 1; }
.sib-host { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.sib:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .sib:hover { border-color: var(--ink); } .sib:hover .sib-name { text-decoration-color: var(--ink); } }
/* AGA Group footer, from geo.analitik.my public/aga/aga.css, in this site's face. AGA blue #0f4583 = corporate chrome only (charter §6). */
.aga-foot { background: #0f4583; color: #dce6f2; margin: 72px 0 0; padding: 48px 0 28px; font-size: 14px; line-height: 1.6; }
.aga-foot .wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.aga-foot .foot-cols { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1.3fr; gap: 32px; }
.aga-foot .logo { display: block; height: 30px; width: auto; margin: 0 0 14px; }
.aga-foot .tagline { margin: 0; max-width: 34ch; }
.aga-foot h2 { color: #ffffff; font-size: 15px; font-weight: 600; line-height: 1.3; margin: 0 0 12px; letter-spacing: 0; }
.aga-foot ul { list-style: none; margin: 0; padding: 0; }
.aga-foot li { margin: 0 0 8px; }
.aga-foot a { color: #ffffff; text-decoration: underline; text-decoration-color: #7f9fc6; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.aga-foot a:hover { text-decoration-color: #ffffff; }
.aga-foot a:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.aga-foot address { font-style: normal; }
.aga-foot .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 16px; border-top: 1px solid #3d6aa0; color: #b9cbe2; font-size: 13px; }
@media (max-width: 760px) { .aga-foot .foot-cols { grid-template-columns: 1fr 1fr; } .aga-foot .foot-cols > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .aga-foot .foot-cols { grid-template-columns: 1fr; } }
@media (max-width: 960px) { .sibs ul { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .sibs ul { grid-template-columns: 1fr; } }

body.fresh #list, body.fresh #compare-wrap { animation: fresh 160ms ease-out; }
@keyframes fresh { from { opacity: 0.4; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.fresh #list, body.fresh #compare-wrap { animation: none; } }

@media (max-width: 960px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .q { grid-column: 1 / -1; }
  td.price, th:nth-child(4) { display: none; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; }
  .src { font-size: 12px; text-align: right; }
  .top { padding-top: 28px; }
  .cols { margin: 0 calc(-1 * var(--gut)); padding-left: var(--gut); padding-right: var(--gut); }
  .col { flex: 0 0 24px; min-height: 270px; }
  .col.past, .col.later { flex: 0 0 48px; }
  table.cmp { font-size: 14px; }
  table.cmp th, table.cmp td { padding: 6px 6px; }
  table.cmp tbody th { min-width: 0; }
  td.soon, th:nth-child(3), table.cmp .full { display: none; }
  td.bars { width: 96px; }
  td.bars .yb { width: 96px; height: 28px; }
  .calls li { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .calls .what { grid-column: 1 / -1; grid-row: 2; }
  .calls .when { flex-direction: row; gap: 8px; align-items: baseline; }
  .filters { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  table.cmp { font-size: 13px; }
  table.cmp th, table.cmp td { padding: 6px 4px; }
  table.cmp thead th { font-size: 12px; }
  td.bars { width: 70px; }
  td.bars .yb { width: 70px; height: 24px; }
  .ch { font-size: 12px; }
  table.cmp tbody th { overflow-wrap: anywhere; }
}
