/* Carvers - Forgejo theme.
 *
 * Managed by ansible (forgejo role). Do not edit on the box.
 *
 * Variable overrides only. No rule here targets a Forgejo class name, so a
 * Forgejo major cannot break this file. That matters: we track the latest
 * stable line, which takes a major about every quarter.
 *
 * Every variable name below was read from the running instance at
 * /assets/css/theme-forgejo-auto.css and /assets/css/index.css. Re-read them
 * after a major before assuming a name still exists.
 *
 * Values come from the Carvers design system: graphite #15140F on bone #F4F0E8,
 * cadmium #C0392B reserved for the accent, sage and oxblood for status.
 */

@import url("https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap");

/* A Forgejo theme file REPLACES the built-in theme; it does not extend it.
 * Of the 285 variables a theme owns, none are declared in index.css, so
 * anything not restated here would be undefined -- which is how the tooltip
 * lost its background. Import the light built-in first and override below.
 * Use the single-mode file, never theme-forgejo-auto.css: that one carries a
 * prefers-color-scheme switch and would fight these values in the other mode.
 */
@import url("theme-forgejo-light.css");

:root {
  /* Type. Forgejo has one proportional font variable, not a display and body
   * pair, so PT Serif carries every proportional surface and headings separate
   * by weight and size. Anything checkable is mono. */
  --fonts-proportional: "PT Serif", Georgia, serif;
  --fonts-monospace: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Geometry. The system has no radii; squares are true squares.
   * 0px, not 0: Forgejo computes the .switch segment padding as
   * calc(var(--switch-padding-inline) + var(--border-radius)). A unitless zero
   * is not a length inside calc(), so `0` makes that invalid at computed-value
   * time and the padding falls back to its initial value -- which jammed the
   * icon of the second filter segment flat against the divider. */
  --border-radius: 0px;
  --border-radius-medium: 0px;
  --border-radius-large: 0px;

  /* Ground and ink. Bone is the page, white and paper are the panels.
   * Ink steps are opacity only, used for type and rules, never as fills. */
  --color-body: #f4f0e8;
  --color-box-body: #ffffff;
  --color-box-header: #fbfaf6;
  --color-nav-bg: #f4f0e8;
  --color-header-wrapper: #f4f0e8;
  --color-footer: #f4f0e8;
  --color-text: #15140f;
  --color-text-light: rgba(20, 20, 15, 0.62);
  --color-text-light-2: rgba(20, 20, 15, 0.42);
  --color-secondary: rgba(20, 20, 15, 0.14);
  --color-light-border: rgba(20, 20, 15, 0.14);
  --color-input-border: rgba(20, 20, 15, 0.30);

  /* Surfaces inherited from the built-in theme are cool zinc greys, which read
   * blue next to warm bone. Restated on the Carvers ground. */
  --color-active: #e9e5db;
  --color-hover: rgba(20, 20, 15, 0.06);
  --color-menu: #fbfaf6;
  --color-box-body-highlight: #f4f0e8;
  --color-markup-code-block: #fbfaf6;
  --color-markup-code-inline: #fbfaf6;
  --color-editor-line-highlight: #fbfaf6;
  --color-timeline: rgba(20, 20, 15, 0.14);
  /* the Actions log console: flat graphite, not the default blue-black */
  --color-console-bg: #15140f;
  /* the console is dark in both themes, so it takes the same warm values */
  --color-console-fg: #f4f0e8;
  --color-console-fg-subtle: rgba(244, 240, 232, 0.50);
  --color-console-border: rgba(244, 240, 232, 0.18);
  --color-console-active-bg: #26241c;
  --color-console-hover-bg: rgba(244, 240, 232, 0.08);
  --color-console-menu-bg: #22211a;
  --color-console-menu-border: rgba(244, 240, 232, 0.30);

  /* Accent. Forgejo spends --color-primary on button fills, links, focus rings
   * and active states all at once. Cadmium cannot carry that: the system says
   * it is never a background, button, stripe, badge or field. So primary is
   * graphite and cadmium is the hover, which reproduces both design-system
   * rules exactly -- a graphite button that fills cadmium on hover, and a
   * graphite link that turns cadmium on hover. Red then appears only on hover
   * and inside the mark. */
  --color-primary: #15140f;
  --color-primary-hover: #c0392b;
  --color-primary-active: #0e0d09;
  --color-primary-contrast: #f4f0e8;

  /* Forgejo derives nothing: the primary ramp is 16 hardcoded oranges, used for
   * hovers, borders, focus rings and selection. Overriding only --color-primary
   * leaves those oranges in place, so the whole ramp is restated in ink. */
  --color-primary-dark-1: #100f0b;
  --color-primary-dark-2: #0e0d09;
  --color-primary-dark-3: #0b0a07;
  --color-primary-dark-4: #090805;
  --color-primary-dark-5: #060604;
  --color-primary-dark-6: #040302;
  --color-primary-dark-7: #020201;
  --color-primary-light-1: #3a3830;
  --color-primary-light-2: #55524a;
  --color-primary-light-3: #706d64;
  --color-primary-light-4: #8b887f;
  --color-primary-light-5: #a6a399;
  --color-primary-light-6: #c1beb4;
  --color-primary-light-7: #dcd9cf;
  --color-primary-alpha-10: rgba(20, 20, 15, 0.10);
  --color-primary-alpha-20: rgba(20, 20, 15, 0.20);
  --color-primary-alpha-30: rgba(20, 20, 15, 0.30);
  --color-primary-alpha-40: rgba(20, 20, 15, 0.40);
  --color-primary-alpha-50: rgba(20, 20, 15, 0.50);
  --color-primary-alpha-60: rgba(20, 20, 15, 0.60);
  --color-primary-alpha-70: rgba(20, 20, 15, 0.70);
  --color-primary-alpha-80: rgba(20, 20, 15, 0.80);
  --color-primary-alpha-90: rgba(20, 20, 15, 0.90);

  /* The raw palette the built-in theme uses for positive/negative buttons,
   * labels, messages and the diff stats bar. Left alone it stays Forgejo's
   * saturated #15803d / #dc2626, which is the last loud colour on the page.
   * Both are fills, so they take the darker status inks and keep bone text. */
  --color-green: #365c3f;
  --color-red: #7a2218;

  /* Status. Sage and oxblood, not UI green and red, so cadmium is not spent
   * on pass and fail. */
  --color-success-text: #365c3f;
  --color-error-text: #7a2218;

  /* Diff. Verified on the running forge: --color-diff-*-row-border is consumed
   * only under .code-diff-split, so in the unified view (Forgejo's default) a
   * transparent row background leaves the +/- glyph as the only signal, which
   * does not scan. A tint is therefore the only variable-only notation.
   *
   * 10% of the status ink on bone reads as tinted paper rather than a colour
   * block, so the code stays the loudest thing in the row. This is a recorded
   * exception to "status is never a fill": in a diff the fill IS the notation.
   * Cadmium is still not spent here.
   *
   * To drop the fill instead, set the two -bg values back to transparent and
   * add one rule -- but that rule targets a Forgejo class name, and is the only
   * thing in this file a Forgejo major could break:
   *   .lines-code.add-code  { box-shadow: inset 3px 0 0 #365c3f; }
   *   .lines-code.del-code  { box-shadow: inset 3px 0 0 #7a2218; }
   */
  --color-diff-added-row-bg: rgba(54, 92, 63, 0.10);
  --color-diff-added-row-border: #365c3f;
  --color-diff-removed-row-bg: rgba(122, 34, 24, 0.10);
  --color-diff-removed-row-border: #7a2218;

  /* Warmed neutrals, generated not hand-picked.
   * The built-in themes build their whole neutral ramp on a cool grey -- zinc
   * in light, a blue slate in dark -- so every border, card, button and muted
   * text carries a blue cast next to bone and graphite. Each value below is the
   * base theme's own colour with its LIGHTNESS PRESERVED and only the hue moved
   * to 44deg at low saturation, so every contrast relationship the base theme
   * relies on still holds; only the cast changes.
   * Colours that carry meaning -- blue, violet, purple, teal, the ansi set, the
   * info and indicator colours, and the label palette -- are deliberately left
   * alone. Regenerate rather than edit these by hand if the base theme moves. */
  --color-button: #eeedec;
  --color-expand-button: #e6e6e5;
  --color-grey: #5c5a52;
  --color-grey-light: #7a7871;
  --color-header-wrapper-transparent: #e3e2df00;
  --color-input-border-hover: #a8a7a3;
  --color-secondary-active: #a8a7a3;
  --color-secondary-dark-1: #e6e6e5;
  --color-secondary-dark-10: #444341;
  --color-secondary-dark-11: #444341;
  --color-secondary-dark-4: #a8a7a3;
  --color-secondary-dark-5: #a8a7a3;
  --color-secondary-dark-8: #595854;
  --color-secondary-dark-9: #595854;
  --color-secondary-light-1: #e6e6e5;
  --color-selection-bg: #777368;
  --color-text-light-1: #4e4d4a;
}
