:root {
    --header-font: system-ui;
    --primary-font: system-ui;
    --background-color: #f0ece9;
    --header-accent-color: #4286f4;
    --link-color: #2b589f;
    --link-hover-color: #1f4a8f;
    --body-text-color: #2d2d2d;
    --faded-text-color: rgba(0, 0, 0, 0.4);
    --line-separator-color: rgba(0, 0, 0, 0.05);
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    margin: 1em auto;
    padding: 0 1em;
    line-height: 150%;
    color: var(--body-text-color);
    font-family: var(--primary-font);
    background-color: var(--background-color);
  }
  
  /* Updated header styles */
  header {
    margin: 2em 0 3em;
    font-family: var(--header-font);
    position: relative;
  }
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .title-area {
    text-align: center;
  }
  
  header .accent {
    color: var(--header-accent-color);
  }
  
  header .subtitle {
    margin-top: 0.5em;
    display: flex;
    justify-content: center;
    gap: 0.25em;
  }
  
  /* New compact controls styles */
  .header-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5em;
  }
  
  .header-controls .control-group {
    display: flex;
    gap: 0.5em;
  }
  
  .header-controls select {
    padding: 0.25em 0.5em;
    border: 1px solid var(--line-separator-color);
    border-radius: 0.3em;
    background: white;
    font-size: 0.9em;
  }
  
  .header-controls button {
    padding: 0.25em 0.5em;
    border: 1px solid var(--line-separator-color);
    border-radius: 0.3em;
    background: white;
    font-size: 0.9em;
    cursor: pointer;
  }

  .header-controls .stats {
    font-size: 0.8em;
    color: var(--faded-text-color);
    text-align: right;
  }
  

  main {
    margin: 1em auto;
    max-width: 56rem;
  }
  
  a {
    text-decoration: none;
    color: var(--link-color);
  }
  
  a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
  }
  
  .link-group {
    margin-top: 2em;
  }
  
  .link {
    padding: 1.75em 0;
    display: flex;
    gap: 2em;
    border-top: 2px solid var(--line-separator-color);
  }
  
  .link-group .link:last-of-type {
    border-bottom: 2px solid var(--line-separator-color);
  }
  
  .link .preview .placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 10rem;
    height: 6rem;
    font-size: 2.5em;
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 0.5rem;
  }
  
  .link .description {
    margin: 0.75em 0;
    color: var(--body-text-color);
    opacity: 0.8;
    font-size: 0.9em;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }
  
  .link .content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5em;
    flex: 1;
  }
  
  .link .title {
    font-size: 1.25em;
    font-family: var(--header-font);
    overflow-wrap: anywhere;
  }
  
  .link .metadata {
    margin: 1rem 0 0 0;
    color: var(--faded-text-color);
    display: flex;
    gap: 0.5em;
  }
  
  .last-updated {
    margin-top: 0.75em;
    color: var(--faded-text-color);
  }
  
  /* Responsive styles */
  @media screen and (max-width: 46em) {
    .header-controls {
      position: static;
      margin-top: 1.5em;
      align-items: center;
    }
  
    .header-controls .stats {
      text-align: center;
    }
  
    .link {
      gap: 1em;
    }
  
    .link .preview .placeholder {
      width: 8rem;
      height: 5rem;
      font-size: 2em;
    }
  }
  
  @media screen and (max-width: 36em) {
    .link {
      padding: 2em 0;
      min-height: 12em;
    }
  
    .link .preview .placeholder {
      margin-top: 0.25rem;
      width: 5rem;
      height: 5rem;
    }
  
    header .subtitle {
      flex-direction: column;
      gap: 0;
    }
  
    .header-controls .control-group {
      flex-direction: column;
      align-items: stretch;
    }
  }
