/* PirateKing.co Global Styles */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-night: #05070f;
  --color-depths: rgba(8, 12, 20, 0.82);
  --color-depths-strong: rgba(11, 16, 26, 0.92);
  --color-shadow: rgba(0, 0, 0, 0.55);
  --color-text-primary: #f4f6fb;
  --color-text-secondary: #d0d4dc;
  --color-text-muted: #8b909b;
  --color-blood: #8c0f18;
  --color-blood-bright: #c21828;
  --color-gold: #d4af37;
  --color-gold-soft: #f0d877;
  --color-iron: #2b2f3a;
  --color-ink: rgba(17, 21, 32, 0.7);
  --border-radius: 14px;
  --border-radius-sm: 8px;
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-crisp: 0 6px 18px rgba(194, 24, 40, 0.25);
  --max-width-readable: 960px;

  --font-heading: "FiraCodeBold", monospace;
  --font-body: "FiraCode", monospace;
  --font-light: "FiraCodeLight", monospace;
}

@font-face {
  font-family: "FiraCodeLight";
  src: url("/css/fonts/woff2/FiraCode-Light.woff2") format("woff2"),
       url("/css/fonts/woff/FiraCode-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "FiraCode";
  src: url("/css/fonts/woff2/FiraCode-Regular.woff2") format("woff2"),
       url("/css/fonts/woff/FiraCode-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "FiraCodeBold";
  src: url("/css/fonts/woff2/FiraCode-Bold.woff2") format("woff2"),
       url("/css/fonts/woff/FiraCode-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "FiraCodeVF";
  src: url("/css/fonts/woff2/FiraCode-VF.woff2") format("woff2-variations"),
       url("/css/fonts/woff/FiraCode-VF.woff") format("woff-variations");
  font-weight: 300 700;
  font-style: normal;
}

html {
  background-color: #000;
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  background: transparent;
  color: var(--color-text-primary);
  line-height: 1.6;
  padding: clamp(1.5rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3.5rem);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 7, 15, 0.85) 0%, rgba(5, 7, 15, 0.35) 60%, rgba(5, 7, 15, 0.85) 100%);
  z-index: -1;
  pointer-events: none;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: #000;
}

main,
section,
article,
.style-shell,
.card,
.panel,
.glass-panel,
footer,
header {
  background: var(--color-depths);
  border: 1px solid rgba(212, 175, 55, 0.05);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.style-shell,
main,
section,
article {
  max-width: var(--max-width-readable);
  width: min(100%, var(--max-width-readable));
  margin: 0 auto;
}

.glass-panel {
  background: var(--color-depths-strong);
}

header,
footer {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);

small {
  color: var(--color-text-muted);
}

strong {
  color: var(--color-blood-bright);
  font-weight: 700;
}

em {
  color: var(--color-text-secondary);
  font-style: italic;
}

code {
  font-family: "FiraCode", monospace;
  background: rgba(194, 24, 40, 0.12);
  border: 1px solid rgba(194, 24, 40, 0.4);
  color: var(--color-gold);
  padding: 0.2em 0.5em;
  border-radius: var(--border-radius-sm);
}

pre {
  background: rgba(5, 7, 15, 0.85);
  border: 1px solid rgba(194, 24, 40, 0.25);
  border-radius: var(--border-radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
}

pre code {
  display: block;
  color: var(--color-text-primary);
}

blockquote {
  border-left: 4px solid var(--color-blood-bright);
  padding-left: 1.5rem;
  margin: 2rem 0;
  background: rgba(8, 12, 20, 0.65);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

ul,
ol {
  margin-left: 1.8em;
  margin-bottom: 1.5em;
  display: grid;
  gap: 0.35em;
}

li::marker {
  color: var(--color-blood-bright);
}

.tree,
.tree ul {
  list-style: none;
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
}
@@ -294,53 +294,53 @@ hr {
/* Links */
a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--color-gold-soft);
  text-shadow: 0 0 12px rgba(240, 216, 119, 0.45);
}

a[aria-current="page"],
nav a.active {
  color: var(--color-blood-bright);
}

/* Navigation */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: center;
  background: var(--color-ink);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.08);
  box-shadow: var(--shadow-crisp);
}

nav a {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

nav a:hover,
nav a:focus-visible {
  color: var(--color-gold);
}

/* Buttons */
.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.button {
  appearance: none;
  border: 1px solid rgba(212, 175, 55, 0.35);
@@ -375,184 +375,184 @@ button:focus-visible {
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: none;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(212, 175, 55, 0.08);
  color: var(--color-gold);
}

.btn--positive {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(240, 216, 119, 0.75));
  color: #0f1116;
  border-color: rgba(212, 175, 55, 0.65);
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.35);
}

.btn--positive:hover,
.btn--positive:focus-visible {
  background: linear-gradient(135deg, rgba(240, 216, 119, 0.95), rgba(212, 175, 55, 0.85));
}

/* Forms */
form {
  display: grid;
  gap: 1.2rem;
  background: rgba(8, 12, 20, 0.7);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--border-radius);
  border: 1px solid rgba(212, 175, 55, 0.08);
  box-shadow: var(--shadow-soft);
}

label {
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.16);
  background: rgba(5, 7, 15, 0.82);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

::placeholder {
  color: var(--color-text-muted);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(8, 12, 20, 0.75);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

th,
td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  text-align: left;
}

th {
  background: rgba(194, 24, 40, 0.2);
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
}

tbody tr:hover {
  background: rgba(194, 24, 40, 0.08);
}

/* Utility */
.text-gold {
  color: var(--color-gold);
}

.text-blood {
  color: var(--color-blood-bright);
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  border-radius: 999px;
  padding: 0.35em 0.9em;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(194, 24, 40, 0.2);
  border: 1px solid rgba(194, 24, 40, 0.35);
  color: var(--color-text-secondary);
}

.badge--good {
  background: rgba(212, 175, 55, 0.25);
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--color-gold);
}

.card,
.panel {
  display: grid;
  gap: 1rem;
}

.card--highlight {
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 12px 28px rgba(212, 175, 55, 0.2);
}

.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.callout {
  background: rgba(194, 24, 40, 0.12);
  border-left: 4px solid var(--color-blood-bright);
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.alert {
  background: rgba(140, 15, 24, 0.45);
  border: 1px solid rgba(140, 15, 24, 0.65);
  padding: 1.2rem 1.5rem;
  border-radius: var(--border-radius);
  color: var(--color-text-primary);
}

.alert--good {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.35);
  color: var(--color-gold);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius);
}

/* Imagery */
img,
video,
canvas,
iframe {
  max-width: 100%;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Tips Page (scoped) — uses PirateKing global tokens + components
   Only applies when <body class="tips-page">
   ========================================================================== */

body.tips-page {
  /* Override global body layout so this page can use its own container */
  padding: 0;
  gap: 0;
  display: block;
  background: transparent;
  /* make room for the sticky bar */
  --tips-sticky-h: 96px;
  padding-bottom: calc(var(--tips-sticky-h) + env(safe-area-inset-bottom, 0px) + 16px);
}

.tips-page .tips-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.tips-page .tips-header {
  text-align: center;
}

.tips-page .tips-header .subtitle {
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

/* Hero (avg gas) */
.tips-page .tips-hero {
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.12);
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.12),
    rgba(194, 24, 40, 0.08)
  );
}

.tips-page .tips-hero .label {
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-heading);
  font-size: 0.8rem;
}

.tips-page .tips-hero .price {
  margin-top: 0.6rem;
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  line-height: 1;
}

.tips-page .tips-hero .unit {
  color: var(--color-text-muted);
  font-size: 1rem;
  font-family: var(--font-body);
}

/* Amount grid */
.tips-page .tips-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 420px) {
  .tips-page .tips-amounts {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tips-page .tips-amt {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 0.75rem;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

.tips-page .tips-amt.is-selected {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25), var(--shadow-crisp);
}

/* Custom amount row (reuse global input styling) */
.tips-page .tips-custom {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.tips-page .tips-custom .prefix {
  color: var(--color-text-muted);
  font-family: var(--font-heading);
}

.tips-page .tips-custom input {
  flex: 1;
}

/* Summary */
.tips-page .tips-summary {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.10);
}

.tips-page .tips-summary .left {
  color: var(--color-text-secondary);
}

.tips-page .tips-summary .amt {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

/* Fill-ups */
.tips-page .tips-fillups {
  display: grid;
  gap: 0.75rem;
}

.tips-page .tips-fillup {
  background: rgba(8, 12, 20, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.08);
  border-radius: var(--border-radius);
  padding: 1rem 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.tips-page .tips-fillup .where {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
}

.tips-page .tips-fillup .when {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.tips-page .tips-fillup .right {
  text-align: right;
}

.tips-page .tips-fillup .gallons {
  font-family: var(--font-heading);
}

.tips-page .tips-fillup .ppg {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.tips-page .tips-muted {
  color: var(--color-text-muted);
  text-align: center;
  padding: 1rem 0;
}

/* Social icon buttons */
.tips-page .tips-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tips-page .tips-social a.btn {
  width: 54px;
  height: 54px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tips-page .tips-social svg {
  width: 24px;
  height: 24px;
}

/* Sticky dock */
.tips-page .tips-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tips-sticky-h) + env(safe-area-inset-bottom, 0px));
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-depths-strong);
  border-top: 1px solid rgba(212, 175, 55, 0.10);
  backdrop-filter: blur(14px);
  box-shadow: 0 -16px 42px rgba(0, 0, 0, 0.35);
}

.tips-page .tips-sticky .inner {
  max-width: 680px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tips-page .tips-sticky .info {
  flex: 1;
  min-width: 0;
}

.tips-page .tips-sticky .label {
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-heading);
  font-size: 0.75rem;
}

.tips-page .tips-sticky .value {
  margin-top: 0.2rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.tips-page .tips-sticky .value small {
  margin-left: 0.35rem;
}
