/* ==========================================================================
   Ricopili — standalone stylesheet
   No dependency on any external theme or network resource. Fonts are a
   pure system-font stack — this server has no outbound internet access,
   so nothing here may depend on a CDN, web font, or any other fetch.

   Token system:
     ink        #12162A   header / footer background
     paper      #F6F7F3   page background (cool off-white, not cream)
     panel      #FFFFFF   card backgrounds
     line       #DBDDD4   borders / rules
     text       #1B1E27   primary text
     text-dim   #5B5F6B   secondary text
     violet     #6E3FD6   primary accent (index-SNP / focus convention
                          borrowed from LD-association plot coloring)
     teal       #1F9E7C   success / confirmation
     red        #C0392B   errors

     display face : serif system stack   (headings, used sparingly)
     body face    : sans-serif system stack
     data face    : monospace system stack (coordinates, ids, labels, buttons)
   ========================================================================== */

:root {
  --ink: #12162A;
  --ink-2: #1C2140;
  --paper: #F6F7F3;
  --panel: #FFFFFF;
  --line: #DBDDD4;
  --line-soft: #E7E8E1;
  --text: #1B1E27;
  --text-dim: #5B5F6B;
  --text-faint: #8A8D95;
  --violet: #6E3FD6;
  --violet-soft: #EFE9FC;
  --teal: #1F9E7C;
  --red: #C0392B;
  --red-soft: #FBEAE8;
  --radius: 10px;

  --font-display: Georgia, 'Times New Roman', 'Liberation Serif', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Consolas', 'Liberation Mono', Menlo, Monaco, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--violet); text-decoration: underline; text-decoration-color: rgba(110,63,214,0.35); }
a:hover { text-decoration-color: var(--violet); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

/* ---------------- signature header ---------------- */

.rico-header {
  background: var(--ink);
  color: #E9E9F2;
  padding: 0;
}

.rico-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 24px 30px;
}

.rico-brandrow {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rico-mark { flex: none; width: 46px; height: 46px; }

.rico-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9A9DC4;
  margin: 0 0 4px;
}

.rico-brandrow h1 {
  margin: 0;
  font-size: 27px;
  color: #F5F4FB;
  letter-spacing: 0.01em;
}

.rico-header-sub {
  max-width: 620px;
  margin: 14px 0 0;
  color: #B7B9D6;
  font-size: 14px;
}

/* ---------------- layout ---------------- */

.rico-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 24px 70px;
}

.rico-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 24px;
}

.rico-intro h2 {
  font-size: 19px;
  margin: 0 0 10px;
}

.rico-intro p { color: var(--text-dim); }

.rico-intro ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14.5px;
}
.rico-intro ul li { margin-bottom: 5px; }
.rico-intro ul li.rico-sep { list-style: none; margin-left: -20px; border-top: 1px solid var(--line-soft); margin-top: 10px; padding-top: 10px; }

.rico-howitworks {
  margin-top: 8px;
}

.rico-error {
  background: var(--red-soft);
  border: 1px solid rgba(192,57,43,0.35);
  color: #8C2A20;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin: 0 0 18px;
}

/* ---------------- form ---------------- */

form#rico-form fieldset {
  border: none;
  border-top: 1px solid var(--line-soft);
  padding: 18px 0 4px;
  margin: 0 0 4px;
}
form#rico-form fieldset:first-of-type { border-top: none; padding-top: 0; }

form#rico-form legend {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  padding: 0;
  margin-bottom: 14px;
}

form#rico-form > fieldset > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
form#rico-form > fieldset > div:last-child { margin-bottom: 0; }

form#rico-form label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  flex: 0 0 320px;
}

.required label::after {
  content: " *";
  color: var(--red);
  font-weight: 700;
}

input[type=text],
input[type=email],
input[type=number],
select {
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #FBFBF9;
  color: var(--text);
  flex: 1 1 220px;
  min-width: 160px;
}

select { font-family: var(--font-body); }

input:focus, select:focus {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
  border-color: var(--violet);
}

input:disabled, select:disabled {
  background: var(--line-soft);
  color: var(--text-faint);
}

.topResults { flex: 0 0 auto; min-width: 180px; }

#importantSnpContainer { display: none; }

/* ---------------- submit / feedback ---------------- */

#rico-submitContainer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 14px;
}

#rico-submit {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  background: var(--ink);
  color: #F2F1EC;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
}
#rico-submit:hover { background: var(--ink-2); }

#rico-loader { height: 22px; }

/* ---------------- footer ---------------- */

.rico-footer {
  background: var(--ink);
  color: #B7B9D6;
  margin-top: 40px;
}
.rico-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 26px 24px;
  font-size: 13px;
}
.rico-footer-inner a { color: #C9B6F7; }

/* ---------------- results.php ---------------- */

.rico-resultbtn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  background: var(--ink);
  color: #F2F1EC;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 8px;
}
.rico-resultbtn:hover { background: var(--ink-2); }

/* ---------------- responsive ---------------- */

@media (max-width: 640px) {
  form#rico-form label { flex-basis: 100%; }
  input[type=text], input[type=email], input[type=number], select {
    flex-basis: 100%;
  }
  .rico-intro ul { columns: 1; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
