/* ribpi.com homepage: the broadside.
   A poster front page for the site. The inner pages are set as bill drafts in css/site.css.
   Colors: ink is RI Blue Dark, the plate is Bitcoin Orange, gold marks new text. */

:root {
  --paper: #f4f6f9;
  --ink: #062f5c;
  --ink-2: #34527a;
  --rule: #062f5c;
  --gold: #C5A648;
  --orange: #e67a00;
  --gothic: 'League Gothic', 'Arial Narrow', Impact, sans-serif;
  --slab: 'Besley', Georgia, 'Times New Roman', serif;
  --pad: 44px;
}
[data-theme="dark"] {
  --paper: #041e3a;
  --ink: #eef3f9;
  --ink-2: #bccbde;
  --rule: #eef3f9;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--slab); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--orange); text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 14px var(--pad) 0; }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 5px solid var(--rule); border-bottom: 1.5px solid var(--rule); padding: 9px 0; position: relative; }
.logo img { height: 44px; width: auto; }
[data-theme="dark"] .logo img { background: #fff; padding: 3px 6px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a, .menu-btn { font-family: var(--gothic); font-size: 23px; line-height: 1.1; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.nav .cta { background: var(--ink); color: var(--paper); padding: 5px 14px 3px; }
.nav .cta:hover { background: var(--orange); color: #041e3a; text-decoration: none; }
.menu-btn { display: none; background: none; border: 2px solid var(--rule); padding: 4px 12px 2px; cursor: pointer; }

/* ---------- The shout ---------- */
.shout { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 28px; align-items: end; border-bottom: 5px solid var(--rule); padding: 6px 0 2px; }
.shout h1 { display: contents; font-weight: 400; }
.shout .big { grid-column: 1; grid-row: 1 / 3; font-family: var(--gothic); font-size: min(16.4vw, 236px); line-height: 0.86; letter-spacing: -0.005em; text-transform: uppercase; white-space: nowrap; }
.shout .big i { font-style: normal; }
.shout .side { grid-column: 2; grid-row: 1; align-self: end; }
.shout .a { display: block; font-style: italic; font-weight: 500; font-size: min(2.6vw, 37px); line-height: 1; margin-bottom: 0.45em; }
.shout .b { display: block; font-family: var(--gothic); font-size: min(7.64vw, 110px); line-height: 0.9; text-transform: uppercase; }
.shout .c { grid-column: 2; grid-row: 2; font-weight: 800; font-size: min(1.8vw, 26px); line-height: 1.5; letter-spacing: 0.02em; text-transform: uppercase; padding: 14px 0 24px; }
.shout .c a { text-decoration: none; }
.shout .c a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 4px; text-underline-offset: 6px; }

/* ---------- The plate ---------- */
.band { height: clamp(150px, 16.4vw, 236px); margin-top: 10px; background: var(--orange); position: relative; overflow: hidden; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; filter: grayscale(1) contrast(1.9) brightness(1.02); mix-blend-mode: multiply; }
.band figcaption { position: absolute; right: 22px; bottom: 14px; background: var(--paper); color: var(--ink); font-family: var(--gothic); font-size: min(6vw, 34px); line-height: 1.15; letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 16px 3px; border: 3px solid var(--rule); }

/* ---------- Three columns ---------- */
h2 { font-family: var(--gothic); font-weight: 400; font-size: 40px; line-height: 1; text-transform: uppercase; margin-bottom: 8px; }
.cols { display: grid; grid-template-columns: minmax(230px, 22.2%) minmax(0, 1fr) minmax(310px, 29.6%); margin-top: 14px; }
.cols > div { padding: 0 26px; }
.cols > div + div { border-left: 1.5px solid var(--rule); }
.cols > div:first-child { padding-left: 0; }
.cols > div:last-child { padding-right: 0; }
.when p { font-size: 16.5px; line-height: 1.45; }
.when strong { display: block; font-weight: 800; font-size: 19px; margin-top: 10px; }
.when p:first-of-type strong { margin-top: 0; }
.more { margin-top: 12px; font-style: italic; font-size: 16px; }
.txt { columns: 2; column-gap: 26px; column-fill: balance; orphans: 1; widows: 1; hyphenate-limit-chars: 6 3 3; -webkit-hyphenate-limit-before: 3; -webkit-hyphenate-limit-after: 3; text-wrap: pretty; font-size: 16.5px; line-height: 1.5; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.list li { border-top: 1.5px solid var(--rule); }
.list li:last-child { border-bottom: 1.5px solid var(--rule); }
.list a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0 6px; font-weight: 800; font-size: 19px; line-height: 1.35; text-decoration: none; text-wrap: balance; }
.list a span { font-weight: 400; font-style: italic; font-size: 15.5px; white-space: nowrap; }
.list a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 5px; }

/* ---------- The three bills ---------- */
.tier { border-top: 5px solid var(--rule); margin-top: 30px; padding-top: 12px; }
.key { font-size: 15.5px; font-style: italic; color: var(--ink-2); margin-bottom: 14px; }
.key ins, .key del { font-style: normal; }
.bills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bills article { padding: 0 26px; }
.bills article + article { border-left: 1.5px solid var(--rule); }
.bills article:first-child { padding-left: 0; }
.bills article:last-child { padding-right: 0; }
.bills h3 { font-family: var(--gothic); font-weight: 400; font-size: 34px; line-height: 1.02; text-transform: uppercase; margin-bottom: 8px; text-wrap: balance; }
.bills p { font-size: 16.5px; line-height: 1.5; }
.bills .st { margin-top: 10px; padding-top: 8px; border-top: 1.5px solid var(--rule); font-weight: 800; font-size: 15.5px; }
.bills .st a { font-weight: 400; font-style: italic; white-space: nowrap; }

ins { text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 3px no-repeat; padding-bottom: 1px; }
del { text-decoration: none; color: var(--ink-2); background: linear-gradient(var(--ink-2), var(--ink-2)) 0 56% / 100% 1.5px no-repeat; }
.draw ins, .draw del { background-size: 0 3px; transition: background-size 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.draw del { background-size: 0 1.5px; }
.draw del.on { background-size: 100% 1.5px; }
.draw ins.on { background-size: 100% 3px; transition-delay: 350ms; }

.acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.acts a { font-family: var(--gothic); font-size: 30px; line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; padding: 9px 22px 5px; border: 3px solid var(--rule); }
.acts a.solid { background: var(--ink); color: var(--paper); }
.acts a:hover { background: var(--orange); border-color: var(--orange); color: #041e3a; }

/* ---------- Inside ---------- */
.inside { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 5px solid var(--rule); margin-top: 30px; padding-top: 12px; }
.inside a { display: block; padding: 0 22px 4px; text-decoration: none; }
.inside a + a { border-left: 1.5px solid var(--rule); }
.inside a:first-child { padding-left: 0; }
.inside a:last-child { padding-right: 0; }
.inside b { display: block; font-family: var(--gothic); font-weight: 400; font-size: 30px; line-height: 1.05; text-transform: uppercase; margin-bottom: 4px; }
.inside span { display: block; font-size: 15.5px; line-height: 1.45; }
.inside a:hover b { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 4px; text-underline-offset: 5px; }

/* ---------- Foot ---------- */
.foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 40px; border-top: 5px solid var(--rule); border-bottom: 5px solid var(--rule); margin-top: 30px; padding: 14px 0 16px; font-size: 15.5px; line-height: 1.5; }
.foot p { max-width: 46em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 6px; }
.foot nav a, .foot .r a { display: inline-block; padding: 4px 0; }
.foot .r { text-align: right; }
.foot button { font: inherit; font-style: italic; color: inherit; background: none; border: 0; padding: 5px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.foot small { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-2); }

/* ---------- Narrower ---------- */
@media (max-width: 1260px) {
  .nav { gap: 18px; }
  .nav a, .menu-btn { font-size: 20px; }
  .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 22px; }
  .cols > .lead { grid-column: 1 / 3; grid-row: 1; padding: 0; border-left: 0; }
  .cols > .when { grid-row: 2; padding-left: 0; }
  .cols > .agenda { grid-row: 2; padding-right: 0; border-left: 1.5px solid var(--rule); }
  .inside { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .inside a:nth-child(3) { padding-left: 0; border-left: 0; }
  .inside a:nth-child(2) { padding-right: 0; }
}

@media (max-width: 900px) {
  :root { --pad: 28px; }
  .menu-btn { display: block; }
  .top { flex-wrap: wrap; }
  .nav { display: none; flex: 1 0 100%; flex-direction: column; align-items: flex-start; gap: 0; border-top: 1.5px solid var(--rule); margin-top: 9px; padding: 8px 0 4px; }
  .nav.open { display: flex; }
  .nav a { font-size: 28px; padding: 5px 0; }
  .nav .cta { margin-top: 8px; padding: 6px 14px 3px; }
  .shout { grid-template-columns: auto 1fr; column-gap: 16px; align-items: baseline; padding-bottom: 8px; }
  .shout .big { grid-column: 1 / 3; grid-row: 1; font-size: calc((100vw - 2 * var(--pad)) / 4.72); }
  .shout .side { grid-column: 1; grid-row: 2; display: flex; align-items: baseline; gap: 0.35em; }
  .shout .a { font-size: 4.2vw; margin: 0; }
  .shout .b { font-size: 10.5vw; white-space: nowrap; }
  .shout .b br, .shout .c br { display: none; }
  .shout .c { grid-column: 2; grid-row: 2; justify-self: end; text-align: right; font-size: 2.3vw; padding: 0; max-width: none; white-space: nowrap; }
  .bills { grid-template-columns: 1fr; }
  .bills article { padding: 14px 0 0; }
  .bills article > h3, .bills article > p:not(.st) { max-width: 62ch; }
  .bills article + article { border-left: 0; border-top: 1.5px solid var(--rule); margin-top: 16px; }
}

@media (max-width: 640px) {
  :root { --pad: 16px; }
  body { font-size: 17px; }
  .wrap { padding-top: 8px; }
  .logo img { height: 40px; }
  .shout { display: block; padding: 8px 0 10px; }
  .shout .big { display: block; white-space: normal; font-size: calc((100vw - 2 * var(--pad)) / 2.42); line-height: 0.84; }
  .shout .big i { display: block; }
  .shout .side { display: flex; align-items: baseline; gap: 0.3em; margin-top: 8px; }
  .shout .a { font-size: 6.4vw; }
  .shout .b { font-size: 16.5vw; }
  .shout .c { justify-self: start; text-align: left; font-size: 4.6vw; padding-top: 6px; white-space: normal; }
  .band { margin-top: 8px; }
  .band figcaption { right: 10px; bottom: 10px; left: auto; padding: 5px 10px 2px; border-width: 2px; }
  h2 { font-size: 36px; }
  .cols { display: block; }
  .cols > div, .cols > .when, .cols > .agenda { padding: 14px 0 0; border-left: 0; }
  .cols > div + div { border-top: 1.5px solid var(--rule); margin-top: 16px; }
  .txt { columns: 1; text-align: left; hyphens: manual; -webkit-hyphens: manual; font-size: 17px; }
  .when p, .bills p { font-size: 17px; }
  .list a { font-size: 18px; }
  .acts a { font-size: 26px; flex: 1 1 100%; text-align: center; }
  .inside { grid-template-columns: 1fr; row-gap: 0; }
  .inside a, .inside a:nth-child(2), .inside a:nth-child(3) { padding: 12px 0; border-left: 0; }
  .inside a + a { border-left: 0; border-top: 1.5px solid var(--rule); }
  .foot { grid-template-columns: 1fr; }
  .foot .r { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .draw ins, .draw del { transition: none; background-size: 100% 3px; }
  .draw del { background-size: 100% 1.5px; }
}

@media print {
  .nav, .menu-btn, .acts, .foot button { display: none; }
  :root { --paper: #fff; --ink: #000; --ink-2: #222; --rule: #000; }
  .band { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  ins { background: none; text-decoration: underline; }
  del { background: none; text-decoration: line-through; }
}
