    :root {
      --bg-top: #f1f8ff;
      --bg-bottom: #e5f0e7;
      --card-bg: #ffffff;
      --text: #1f2a2e;
      --muted: #55666d;
      --accent: #0b7a75;
      --accent-hover: #08655f;
      --secondary: #e8efec;
      --secondary-hover: #dbe6e2;
      --border: #d7e3df;
      --shadow: 0 12px 30px rgba(25, 45, 51, 0.12);
    }

    * {
      /* Keeps padding and border inside element width/height calculations. */
      box-sizing: border-box;
    }

    /* Centers the calculator card on the page and sets global text styles. */
    body {
      margin: 0;
      min-height: 100vh;
      padding: 24px;
      font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
      color: var(--text);
      background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
    }

    body.tool {
      display: grid;
      place-items: center;
    }

    body.home {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    main.home {
      width: min(100%, 720px);
      padding-top: 4rem; /* adjust to taste */
      text-align: center;
    }

    body.home footer {
      margin-top: auto;
      width: 100%;
      text-align: center;
    }


    /* Main card container for the calculator UI. */
    .card {
      width: min(100%, 520px);
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 24px;
      box-shadow: var(--shadow);
    }

    h1 {
      margin: 0 0 16px;
      font-size: 1.5rem;
    }

    form {
      display: grid;
      gap: 10px;
    }

    .actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    label {
      font-weight: 600;
    }

    input,
    button {
      font: inherit;
      border-radius: 8px;
    }

    input {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid var(--border);
    }

    button {
      padding: 10px 14px;
      border: 0;
      cursor: pointer;
    }

    button[type="submit"] {
      color: #fff;
      background: var(--accent);
    }

    button[type="submit"]:hover {
      background: var(--accent-hover);
    }

    #reset-btn {
      color: var(--text);
      background: var(--secondary);
      border: 1px solid var(--border);
    }

    #reset-btn:hover {
      background: var(--secondary-hover);
    }

    #result {
      margin: 16px 0 12px;
      font-weight: 700;
    }

    #breakdown {
      border-top: 1px solid var(--border);
      padding-top: 12px;
    }

    #breakdown h2 {
      margin: 0 0 8px;
      font-size: 1.05rem;
    }

    #breakdown ul {
      margin: 0;
      padding-left: 20px;
      color: var(--muted);
    }

    #breakdown li {
      margin: 6px 0;
    }

    footer {
      text-align: center;
      font-size: 0.8rem;
      color: #888;
      opacity: 0.8;
    }

  .home h1 {
    margin: 0 0 1rem 0;
    font-size: 3rem;
  }


  .tagline {
    color: #666;
    margin: 0.5rem 0 2.5rem;
    font-size: 1rem;
  }


  .home nav a {
    display: inline-block;
    margin: 1rem 0;
    text-decoration: none;
    font-weight: 500;
    color: var(--text);
  }

  .home nav a:hover {
    text-decoration: underline;
  }
