/*
 * GI Tool Kit v1 — shared chrome for every Gunpowder Innovations free tool.
 *
 * Canonical copy: shared/gi-tool-kit/gi-tool-kit.css. Each tool carries a
 * verbatim copy of this file (inlined or imported). Change it here first, then
 * re-copy into every tool so all operation pages stay identical.
 *
 * Contents: tokens · app bar · tool header · buttons · footer · focus.
 * Everything is prefixed gi- so it cannot collide with tool styles.
 */

:root {
  /* Brand (gunpowderinnovations.com) */
  --gi-pink: #ff0073;          /* logo, small accent marks — not for text   */
  --gi-brand: #d6005f;         /* buttons, links, selected, focus (AA)      */
  --gi-brand-hover: #b80051;
  --gi-brand-active: #9c0045;
  --gi-brand-soft: #fff0f6;
  --gi-brand-soft-border: #ffd0e2;
  --gi-brand-ring: rgba(214, 0, 95, 0.28);

  /* Ground & surfaces */
  --gi-bg: #f4f2ee;
  --gi-surface: #ffffff;
  --gi-sunken: #f7f7f8;

  /* Text */
  --gi-ink: #121218;
  --gi-text-2: #323648;
  --gi-muted: #5f646c;
  --gi-faint: #7b7c8c;

  /* Lines */
  --gi-border: #e0e2e6;
  --gi-border-strong: #c9cdd2;

  /* Status */
  --gi-success: #00805e;
  --gi-success-bg: #e8f7f2;
  --gi-success-border: #b6e6d8;

  /* Type */
  --gi-font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gi-font-heading: "Lora", Georgia, "Times New Roman", serif;

  /* Shape */
  --gi-r-sm: 8px;
  --gi-r-md: 12px;
  --gi-r-lg: 16px;
  --gi-shadow-tile: 0 4px 8px -4px #c9cdd2, 0 12px 18px -2px rgba(201, 205, 210, 0.55),
    inset 0 1px 0 #ffffff, inset 0 -1px 0 #c9cdd2;
  --gi-shadow-card: 0 1px 2px rgba(18, 18, 24, 0.04);

  /* Layout */
  --gi-wrap: 1280px;
  --gi-gutter: 24px;

  /* Motion */
  --gi-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gi-dur: 180ms;
}

@media (max-width: 640px) {
  :root {
    --gi-gutter: 16px;
  }
}

/* ------------------------------------------------------------- app bar */

.gi-appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--gi-surface);
  border-bottom: 1px solid var(--gi-border);
  font-family: var(--gi-font);
}

.gi-appbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--gi-wrap);
  height: 64px;
  margin-inline: auto;
  padding-inline: var(--gi-gutter);
}

.gi-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--gi-ink);
  text-decoration: none;
  border-radius: var(--gi-r-sm);
}

.gi-brand-logo {
  display: block;
  flex: none;
  width: auto;
  height: 30px;
}

.gi-brand-div {
  flex: none;
  width: 1px;
  height: 22px;
  background: var(--gi-border-strong);
}

.gi-brand-product {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gi-appbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

@media (max-width: 640px) {
  .gi-appbar-in {
    height: 56px;
  }

  .gi-brand-logo {
    height: 26px;
  }

  .gi-brand-div,
  .gi-brand-product {
    display: none;
  }
}

/* --------------------------------------------------------- tool header */

.gi-toolhead {
  background: var(--gi-surface);
  border-bottom: 1px solid var(--gi-border);
  font-family: var(--gi-font);
}

.gi-toolhead-in {
  max-width: var(--gi-wrap);
  margin-inline: auto;
  padding: 18px var(--gi-gutter) 22px;
}

.gi-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--gi-muted);
  font-size: 13px;
  line-height: 1.4;
}

.gi-crumbs a {
  color: var(--gi-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color var(--gi-dur) var(--gi-ease);
}

.gi-crumbs a:hover {
  color: var(--gi-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gi-crumbs svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.gi-crumbs [aria-current] {
  color: var(--gi-ink);
  font-weight: 500;
}

.gi-toolhead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.gi-toolhead-id {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.gi-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--gi-r-md);
  background: var(--gi-surface);
  box-shadow: var(--gi-shadow-tile);
  color: var(--gi-brand);
}

.gi-tile svg {
  width: 22px;
  height: 22px;
}

.gi-title {
  margin: 0;
  color: var(--gi-ink);
  font-family: var(--gi-font-heading);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.gi-subtitle {
  margin: 2px 0 0;
  color: var(--gi-text-2);
  font-size: 15px;
  line-height: 1.5;
}

.gi-toolhead-end {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gi-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 5px 12px;
  border: 1px solid var(--gi-success-border);
  border-radius: 999px;
  background: var(--gi-success-bg);
  color: var(--gi-success);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
}

.gi-privacy svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .gi-toolhead-in {
    padding-block: 14px 16px;
  }

  .gi-crumbs {
    margin-bottom: 10px;
  }

  .gi-tile {
    width: 40px;
    height: 40px;
  }

  .gi-title {
    font-size: 22px;
  }

  .gi-subtitle {
    font-size: 14px;
  }
}

/* ------------------------------------------------------------- buttons */

.gi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--gi-r-md);
  font-family: var(--gi-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--gi-dur) var(--gi-ease), border-color var(--gi-dur) var(--gi-ease),
    color var(--gi-dur) var(--gi-ease);
}

.gi-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.gi-btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
}

.gi-btn-primary {
  background: var(--gi-brand);
  color: #fff;
}

.gi-btn-primary:hover {
  background: var(--gi-brand-hover);
}

.gi-btn-primary:active {
  background: var(--gi-brand-active);
}

.gi-btn-secondary {
  background: var(--gi-surface);
  border-color: var(--gi-border-strong);
  color: var(--gi-ink);
}

.gi-btn-secondary:hover {
  border-color: var(--gi-ink);
}

.gi-btn-ghost {
  background: transparent;
  color: var(--gi-text-2);
}

.gi-btn-ghost:hover {
  background: var(--gi-sunken);
  color: var(--gi-ink);
}

.gi-btn:disabled,
.gi-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.gi-appfoot {
  border-top: 1px solid var(--gi-border);
  font-family: var(--gi-font);
}

.gi-appfoot-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  max-width: var(--gi-wrap);
  margin-inline: auto;
  padding: 18px var(--gi-gutter);
  color: var(--gi-muted);
  font-size: 13px;
  line-height: 1.5;
}

.gi-appfoot p {
  margin: 0;
}

.gi-appfoot a {
  color: var(--gi-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gi-border-strong);
  text-underline-offset: 3px;
  border-radius: 4px;
}

.gi-appfoot a:hover {
  text-decoration-color: var(--gi-brand);
}

/* --------------------------------------------------------------- focus */

.gi-appbar :focus-visible,
.gi-toolhead :focus-visible,
.gi-appfoot :focus-visible,
.gi-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--gi-surface), 0 0 0 4px var(--gi-brand);
}

@media print {
  .gi-appbar,
  .gi-toolhead,
  .gi-appfoot {
    display: none !important;
  }
}
