/* PQC-X site, after xjtlu.edu.cn: white pages, navy #010544, the navy→pink brand gradient, lavender panels,
   a hero band with a light white title, rounded grey buttons, navy footer. Light only. No external font:
   Gilroy is used when installed, otherwise the same fallbacks as xjtlu.edu.cn. */
:root {
  --navy: #010544; --navy-2: #2b2f78; --pink: #ce57c1; --plum: #8a2c86;
  --fg: #1f2244; --muted: #6a6e8c;
  --panel: #f2f2f9; --panel-2: #eef0f4; --line: #e2e3ee; --line-2: #c9cbdd; --bg: #ffffff;
  --v1: #a4132b; --v2: #c25a0e; --v3: #a8851c; --v4: #8b8fa9; --v5: #4f56a8;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 "Gilroy", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif; }
a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { color: var(--pink); text-decoration-color: var(--pink); }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--panel); padding: 0 .3em; border-radius: 4px; }
sup { font-size: .72em; line-height: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); font-weight: 400; }

/* brand strip, header */
.strip { height: 6px; background: linear-gradient(90deg, var(--navy) 0%, var(--pink) 100%); }
header.top { background: var(--bg); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 96px; flex-wrap: wrap; }
.brand { color: var(--navy); font-weight: 700; font-size: 32px; letter-spacing: .08em; text-decoration: none; line-height: 1.1; }
.brand span { display: block; color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-top: 5px; }
.brand:hover { color: var(--navy); text-decoration: none; }
header nav { display: flex; gap: 34px; flex-wrap: wrap; }
header nav a { color: var(--navy); text-decoration: none; font-size: 16px; font-weight: 500; padding: 8px 0; border-bottom: 2px solid transparent; }
header nav a:hover { color: var(--navy); border-bottom-color: var(--pink); }
header nav a.on { border-bottom-color: var(--pink); font-weight: 600; }

/* hero band, as on the XJTLU section pages: gradient, white light title with a short line before it */
.hero { background: radial-gradient(ellipse at 92% 20%, rgba(206,87,193,.35), transparent 50%), linear-gradient(105deg, #010544 0%, #17156a 38%, #45288c 72%, #7b3fa8 100%); color: #fff; padding: 44px 0 40px; }
.hero .crumb { color: rgba(255,255,255,.72); font-size: 14.5px; margin: 0 0 22px; }
.hero .crumb a { color: #fff; text-decoration: none; }
.hero .crumb a:hover { text-decoration: underline; }
.hero .kicker { color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .18em; font-size: 12.5px; margin: 0 0 10px; font-weight: 500; }
.hero h1 { color: #fff; font-size: 44px; font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: 0; padding-left: 86px; text-indent: -86px; }
.hero h1::before { content: ""; display: inline-block; width: 64px; height: 2px; background: #fff; vertical-align: middle; margin: 0 22px 6px 0; }

main.wrap { padding-top: 56px; padding-bottom: 64px; }
h2 { font-size: 24px; margin: 52px 0 14px; color: var(--navy); font-weight: 600; }
h2 .muted { font-weight: 400; font-size: 18px; }
h3 { font-size: 13px; margin: 26px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.lead { font-size: 17px; margin: 0 0 14px; color: var(--fg); }
.sub { color: var(--muted); margin: 0 0 12px; }
.summary { color: var(--navy); font-size: 16px; font-weight: 600; margin: 0 0 22px; }

/* verdicts: coloured by gravity, bold, with a square marker */
.v { white-space: nowrap; font-weight: 700; }
.v i { display: inline-block; width: 11px; height: 11px; margin: 0 8px 0 0; vertical-align: -1px; border-radius: 2px; background: currentColor; }
.v-critical { color: var(--v1); }
.v-major { color: var(--v2); }
.v-minor { color: var(--v3); }
.v-proofgap { color: var(--v5); }
.v-note { color: var(--v4); font-weight: 600; }
table.ft tbody td:first-child { border-left: 4px solid transparent; }
table.ft tbody tr.r-critical td:first-child { border-left-color: var(--v1); }
table.ft tbody tr.r-major td:first-child { border-left-color: var(--v2); }
table.ft tbody tr.r-minor td:first-child { border-left-color: var(--v3); }
table.ft tbody tr.r-proofgap td:first-child { border-left-color: var(--v5); }
table.ft tbody tr.r-note td:first-child { border-left-color: var(--line-2); }

/* legend: one rounded grey box listing the levels, the feasibility words under a rule */
.legend { background: var(--panel); border-radius: 12px; padding: 16px 22px 14px; margin: 0 0 12px; font-size: 14.5px; }
.legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 26px; margin: 0; align-items: baseline; }
.legend dd { margin: 0; color: var(--muted); line-height: 1.5; }
.legend p.feas { margin: 13px 0 0; padding-top: 11px; border-top: 1px solid var(--line-2); color: var(--muted); line-height: 1.5; }
.legend p.feas b { color: var(--fg); font-weight: 600; }

/* tags: rounded light-grey buttons with navy text */
.t { display: inline-block; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--navy); background: var(--panel); border-radius: 8px; padding: 5px 11px; line-height: 1.3; }
.t.light { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.t.ev-demonstrated { background: #e4e5f4; color: var(--navy); font-weight: 600; }
.t.ev-small-scale { background: var(--panel-2); }
.t.ev-argued { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.t.nc { background: transparent; border: 1px dashed var(--v3); color: var(--v3); }
.sep { display: none; }
.facts .t, .facts .v { margin: 0 6px 6px 0; }

/* tables: fit the page, wrap the text; no scrolling */
.tw { margin: 14px 0 22px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 13px 14px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--navy); font-weight: 600; background: var(--panel); }
table.ft td.cand { font-weight: 700; white-space: nowrap; }
table.ft td.cand a { text-decoration: none; }
table.ft td.cand a:hover { text-decoration: underline; }
table.ft td.title { width: 26%; }
table.ft td.title a { text-decoration: none; color: var(--fg); }
table.ft td.title a:hover { text-decoration: underline; color: var(--pink); }
table.ft td.cost { width: 24%; }
table.ft td.credit { color: var(--muted); font-size: 13.5px; }
table.ft tbody tr:hover td { background: #fafafd; }
.flag { display: block; font-size: 12px; font-weight: 600; color: var(--v2); margin-top: 3px; text-decoration: none; }
table.grid td, table.grid th { text-align: center; vertical-align: middle; padding: 18px 14px; }
table.grid tbody th, table.grid tr th:first-child { text-align: left; text-transform: none; letter-spacing: 0; font-size: 14.5px; color: var(--fg); background: var(--bg); white-space: normal; }
table.grid small { color: var(--muted); font-weight: 400; display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; }
table.st td.pset { font-weight: 600; }

ul.cols { columns: 4 190px; column-gap: 24px; padding-left: 18px; margin: 6px 0 12px; }
ul.cols li { break-inside: avoid; margin: 0 0 4px; }
.fam { color: var(--muted); font-size: 12.5px; margin-left: 6px; }

/* candidate pages */
h2.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 600; margin-top: 40px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
ul.toc { list-style: none; padding: 0; margin: 12px 0 8px; }
ul.toc li { margin: 7px 0; }
ul.toc a { text-decoration: none; }
ul.toc a:hover { text-decoration: underline; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 26px 30px 18px; margin: 18px 0 24px; scroll-margin-top: 16px; }
.card h2 { margin: 2px 0 12px; font-size: 22px; color: var(--navy); font-weight: 600; }
.fid { font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); letter-spacing: .04em; }
.facts { margin: 0 0 12px; font-size: 15px; }
.prop, .scope { margin: 4px 0; }
.prop span, .scope span { color: var(--muted); font-weight: 600; }
.scope { background: var(--panel); border-radius: 8px; padding: 6px 12px; margin: 10px 0; display: inline-block; }
.root { color: var(--muted); font-size: 14px; font-style: italic; }
.adds { background: var(--panel); border-radius: 12px; padding: 4px 20px 8px; margin: 18px 0; }
.adds h3 { margin-top: 14px; color: var(--navy); }
.pending { background: var(--panel); border-radius: 12px; padding: 14px 20px; margin: 0 0 22px; }
.pending b { color: var(--v2); }
.pending ul { margin: 8px 0; }
.pending p { margin: 6px 0 2px; color: var(--muted); font-size: 14px; }
p.rel { margin-bottom: 2px; color: var(--muted); font-size: 14px; }
ul.rel { margin-top: 2px; font-size: 14px; color: var(--muted); }
.lit { color: var(--muted); font-size: 14px; }
a.ext::after { content: " ↗"; font-size: .85em; }

footer { background: var(--navy); color: rgba(255,255,255,.78); font-size: 13.5px; padding: 30px 0 34px; margin-top: 20px; }
footer b { color: #fff; letter-spacing: .08em; }

/* phones */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  header.top .wrap { gap: 6px 14px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  header nav { gap: 18px; }
  header nav a { font-size: 14px; }
  .hero { padding: 36px 0 32px; }
  .hero h1 { font-size: 30px; }
  .hero h1 { padding-left: 40px; text-indent: -40px; }
  .hero h1::before { width: 28px; margin-right: 12px; }
  main.wrap { padding-top: 32px; }
  h2 { font-size: 23px; }
  .lead { font-size: 16.5px; }
  th, td { padding: 8px 9px; }
  .card { padding: 16px 16px 10px; }
  .legend dl { grid-template-columns: 1fr; gap: 2px 0; }
  .about p { text-align: left; }
  .legend dd { margin-bottom: 8px; }
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt thead { display: none; }
  table.rt tr { padding: 12px 10px; border-bottom: 1px solid var(--line); }
  table.rt tr:last-child { border-bottom: 0; }
  table.rt td { border: 0; padding: 3px 0; min-width: 0 !important; width: auto !important; }
  table.ft tbody td:first-child { border-left: 0; }
  table.rt td.i, table.rt td.cand { display: inline-block; width: auto !important; margin: 0 10px 2px 0; vertical-align: middle; white-space: normal; }
  table.rt td.cand { font-size: 15.5px; }
  table.rt td.cand .cand-meta { display: inline; margin-left: 6px; font-size: 12.5px; }
  table.rt td.title { font-weight: 550; margin-bottom: 4px; }
  table.rt td.title .cand-meta { display: block; margin-top: 2px; }
  table.ft td.title a::after { content: ""; }
  table.rt td.by { color: var(--muted); }
  table.rt td.pset { font-size: 15px; margin-bottom: 2px; }
  table.rt td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }
  table.ft tbody tr:hover td { background: none; }
  .flag { display: inline; margin-left: 6px; }
}

/* main tables, reduced: the verdict, the candidate (click for the description), feasibility over evidence, credit */
table.ft td.cand { white-space: normal; }
table.ft td.cand a { font-weight: 700; }
table.ft td.i .t { margin-top: 6px; }
table.ft td.i .t:first-child { margin-top: 0; }
table.ft th:nth-child(1), table.ft td:nth-child(1) { width: 19%; }
table.ft th:nth-child(2), table.ft td:nth-child(2) { width: 15%; }
table.ft td.title { width: 32%; }
table.ft td.title a { color: var(--fg); }
table.ft td.title a::after { content: " →"; color: var(--line-2); }
table.ft td.title a:hover::after { color: var(--pink); }

/* about: three grey boxes, as the legend */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 8px 0 20px; }
.about > div { background: var(--panel); border-radius: 12px; padding: 6px 20px 14px; }
.about h3 { margin-top: 14px; color: var(--navy); }
.about p { margin: 6px 0 0; font-size: 14.5px; color: var(--fg); }
.cand-meta { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* home: one rounded grey box per part, the whole box a link to the part's cryptanalysis page */
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 28px 0 8px; }
a.pick { display: block; background: var(--panel); border-radius: 16px; padding: 30px 28px; text-decoration: none; color: var(--fg); }
a.pick:hover { background: var(--panel-2); color: var(--fg); }
.pick h2 { margin: 0; font-size: 24px; }
.pick h2::after { content: " →"; color: var(--line-2); font-weight: 400; }
a.pick:hover h2 { color: var(--pink); }
a.pick:hover h2::after { color: var(--pink); }

/* buttons, like the XJTLU link buttons: light grey, navy text, rounded */
.btn { display: inline-block; background: var(--panel); color: var(--navy); padding: 9px 16px; border-radius: 8px; font-weight: 600; font-size: 14.5px; text-decoration: none; margin: 0 0 6px; }
.btn:hover { background: var(--panel-2); color: var(--pink); text-decoration: none; }

/* PQC-X / All findings: two text tabs on a rule, the active one underlined in plum; radio inputs, CSS only */
.who { position: relative; margin-top: 36px; }
.who > input { position: absolute; opacity: 0; pointer-events: none; }
.seg { display: flex; gap: 30px; border-bottom: 1px solid var(--line); }
.seg label { padding: 8px 2px 10px; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer; font-size: 16px; font-weight: 500; color: var(--muted); }
.seg label:hover { color: var(--navy); }
.who .panel { display: none; }
#w-pqcx:checked ~ .panel.p-pqcx, #w-all:checked ~ .panel.p-all { display: block; }
#w-pqcx:checked ~ .seg label[for="w-pqcx"], #w-all:checked ~ .seg label[for="w-all"] { color: var(--plum); font-weight: 600; border-bottom-color: var(--plum); }
.who .panel > .summary:first-child { margin: 22px 0 0; }
.who .panel > h2:first-child { margin-top: 26px; }
.who .panel > .sub:first-child { margin-top: 22px; }
.who .panel > .summary + h2 { margin-top: 40px; }

/* justified text inside the boxes */
.about p { text-align: justify; }

.adds-line { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 4px; }

/* the All findings lists: verdict, candidate, the finding (ours in a few words, theirs by their title), by whom */
table.ol th:nth-child(n), table.ol td:nth-child(n) { width: auto; }
table.ol td.i { width: 19%; }
table.ol td.cand { width: 15%; }
table.ol td.title { width: 44%; }
table.ol td.by { width: 22%; color: var(--muted); font-size: 13.5px; }
table.ol td.title a.ext { color: var(--navy); }

.ast { color: inherit; font-weight: inherit; }
