/*
Theme Name: Twenty Fifteen
Description: Standalone replacement stylesheet for the restored "Der essbare Waldgarten" blog.
*/

/*!
 * Der essbare Waldgarten: standalone site stylesheet
 *
 * For the restored WordPress blog (Twenty Fifteen theme markup). Every page
 * links /wp-content/themes/twentyfifteen/style.css, so upload this file at
 * that address (in Archivarix the URL ends in ?ver=4.8.2) with the MIME type
 * text/css. No page needs to be edited.
 *
 * Look: a garden logbook. A forest-green sidebar, white entry cards on a
 * moss-grey ground, each entry opening with its date like a journal page,
 * and Alegreya (serif for reading, sans for labels), a lively, organic type
 * family. Berry red marks the few things that need a second colour.
 *
 * No script needed: the theme's "Menu and widgets" button is replaced by
 * placing the sidebar widgets under the posts on small screens.
 * All colours, fonts and sizes are in the tokens in section 1.
 */

@import url("https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400..800;1,400..600&family=Alegreya+Sans:wght@400;500;700&display=swap");


/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  --wg-forest: #233628;            /* sidebar */
  --wg-forest-line: rgba(255, 255, 255, 0.1);
  --wg-leaf: #b3d3a3;              /* labels on the sidebar */
  --wg-on-forest: #e9efe5;

  --wg-ground: #eceee6;            /* page behind the entries */
  --wg-paper: #ffffff;
  --wg-line: #dde1d4;
  --wg-field: #8a9384;

  --wg-ink: #222821;
  --wg-ink-soft: #5a6355;
  --wg-green: #2f6b3a;             /* links */
  --wg-berry: #a3304b;             /* the few second-colour marks */

  --wg-font-serif: "Alegreya", Georgia, "Times New Roman", serif;
  --wg-font-sans: "Alegreya Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --wg-sidebar: clamp(16rem, 24vw, 22rem);
  --wg-entry: 46rem;
  --wg-gutter: clamp(1rem, 4vw, 3rem);
  --wg-radius: 6px;
}


/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--wg-font-serif);
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--wg-ink);
  background-color: var(--wg-ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  color: var(--wg-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--wg-ink);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--wg-font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--wg-ink);
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

abbr[title] {
  text-decoration: none;
}

::selection {
  color: var(--wg-forest);
  background: var(--wg-leaf);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link.screen-reader-text:focus {
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  width: auto;
  height: auto;
  padding: 0.6rem 1rem;
  clip: auto;
  font-family: var(--wg-font-sans);
  color: var(--wg-forest);
  background: var(--wg-paper);
  border-radius: var(--wg-radius);
}


/* ==========================================================================
   3. Page layout
   Wide screens: a sticky forest-green sidebar beside the entries.
   Small screens: title bar on top, entries, then the sidebar widgets.
   ========================================================================== */

#page {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 60em) {
  #page {
    grid-template-columns: var(--wg-sidebar) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }

  #sidebar {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 3rem 2rem;
    color: var(--wg-on-forest);
    background-color: var(--wg-forest);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  }

  #content {
    grid-column: 2;
    grid-row: 1;
  }

  #colophon {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 59.99em) {
  #page {
    grid-template-columns: minmax(0, 1fr);
  }

  #sidebar {
    display: contents;
  }

  #masthead {
    order: 1;
    padding: 1.5rem var(--wg-gutter);
    color: var(--wg-on-forest);
    background-color: var(--wg-forest);
  }

  #masthead .site-branding {
    padding-bottom: 0;
    border-bottom: 0;
  }

  #secondary .widget:first-child {
    margin-top: 0;
  }

  #content {
    order: 2;
  }

  #secondary {
    order: 3;
    padding: 2rem var(--wg-gutter) 2.5rem;
    color: var(--wg-on-forest);
    background-color: var(--wg-forest);
  }

  #colophon {
    order: 4;
    color: var(--wg-on-forest);
    background-color: var(--wg-forest);
    border-top: 1px solid var(--wg-forest-line);
  }
}

.site-content {
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--wg-gutter);
}

.site-main {
  max-width: var(--wg-entry);
  margin-inline: auto;
}


/* ==========================================================================
   4. Site title and sidebar widgets
   ========================================================================== */

.site-branding {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--wg-forest-line);
}

.site-title {
  margin: 0 0 0.35rem;
  font-family: var(--wg-font-serif);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
}

.site-title a {
  color: #ffffff;
  text-decoration: none;
}

.site-description {
  margin: 0;
  font-family: var(--wg-font-sans);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--wg-leaf);
}

/* The theme's mobile toggle needs its script; the widgets are always shown */
.secondary-toggle {
  display: none !important;
}

.secondary {
  display: block !important;
}

.widget {
  margin-top: 2rem;
  font-family: var(--wg-font-sans);
  font-size: 1rem;
  line-height: 1.45;
}

.widget-title {
  margin: 0 0 0.5rem;
  font-family: var(--wg-font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--wg-leaf);
}

.widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--wg-forest-line);
}

.widget li:last-child {
  border-bottom: 0;
}

.widget a {
  color: var(--wg-on-forest);
  text-decoration: none;
}

.widget a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.widget_recent_comments li {
  color: rgba(233, 239, 229, 0.75);
}

.widget_recent_comments .comment-author-link {
  color: var(--wg-leaf);
}

/* Log-in and feed links lead nowhere in a restored copy */
.widget_meta {
  display: none;
}

.search-form label {
  display: block;
}

.search-field {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--wg-font-sans);
  font-size: 1rem;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--wg-radius);
  -webkit-appearance: none;
  appearance: none;
}

.search-field::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.search-field:focus {
  outline: none;
  border-color: var(--wg-leaf);
  box-shadow: 0 0 0 3px rgba(179, 211, 163, 0.3);
}

/* On small screens the widgets sit in two columns when there is room */
@media (min-width: 37.5em) and (max-width: 59.99em) {
  .widget-area {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2rem;
  }

  .widget_search {
    grid-column: 1 / -1;
  }
}


/* ==========================================================================
   5. Entries
   Each card opens with its date, like a page in a garden logbook.
   ========================================================================== */

.site-main > article,
.site-main > .page,
.site-main > .post {
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.25rem, 4vw, 2.75rem);
  background-color: var(--wg-paper);
  border: 1px solid var(--wg-line);
  border-radius: var(--wg-radius);
}

.entry-header {
  margin-bottom: 1.1rem;
}

.entry-title {
  margin: 0;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

.entry-title a {
  color: var(--wg-ink);
  text-decoration: none;
}

.entry-title a:hover {
  color: var(--wg-green);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Date line first */
.entry-footer {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-bottom: 0.6rem;
  font-family: var(--wg-font-sans);
  font-size: 0.9375rem;
  color: var(--wg-ink-soft);
}

.entry-footer a {
  color: var(--wg-ink-soft);
  text-decoration: none;
}

.entry-footer a:hover {
  color: var(--wg-green);
  text-decoration: underline;
}

.entry-footer .posted-on a {
  font-weight: 700;
  color: var(--wg-ink);
}

/* Show only one date: the modified date stays hidden when a published date exists */
.posted-on .updated:not(.published) {
  display: none;
}

.sticky-post {
  padding: 0.1rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--wg-berry);
  border-radius: 999px;
}

.entry-content {
  overflow-wrap: break-word;
  hyphens: auto;
}

.entry-content img {
  display: block;
  width: 100%;
  border-radius: 4px;
}

.entry-content p:has(> a > img:only-child),
.entry-content p:has(> img:only-child) {
  margin-bottom: 1.25rem;
}

.entry-content a:has(> img) {
  display: block;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.6em;
}

.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.35rem; }

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.1em;
  padding-left: 1.4rem;
}

.entry-content blockquote {
  margin: 1.5em 0;
  padding-left: 1.1rem;
  font-style: italic;
  color: var(--wg-ink-soft);
  border-left: 3px solid var(--wg-leaf);
}

.alignleft {
  float: left;
  margin: 0.3rem 1.25rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0.3rem 0 1rem 1.25rem;
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  margin-top: 0.4rem;
  font-family: var(--wg-font-sans);
  font-size: 0.9375rem;
  color: var(--wg-ink-soft);
}

.page-title:empty,
.page-header:has(.page-title:empty) {
  display: none;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
}


/* ==========================================================================
   6. Paging, post navigation, comments (single posts)
   ========================================================================== */

.pagination .nav-links,
.post-navigation .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
  font-family: var(--wg-font-sans);
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.4rem 0.9rem;
  font-weight: 700;
  color: var(--wg-ink);
  text-decoration: none;
  background-color: var(--wg-paper);
  border: 1px solid var(--wg-line);
  border-radius: var(--wg-radius);
}

a.page-numbers:hover {
  color: var(--wg-green);
  border-color: var(--wg-green);
}

.page-numbers.current {
  color: #ffffff;
  background-color: var(--wg-forest);
  border-color: var(--wg-forest);
}

.post-navigation .nav-links > div {
  flex: 1 1 18rem;
}

.post-navigation a {
  display: block;
  height: 100%;
  padding: 1rem 1.25rem;
  color: var(--wg-ink);
  text-decoration: none;
  background-color: var(--wg-paper);
  border: 1px solid var(--wg-line);
  border-radius: var(--wg-radius);
}

.post-navigation a:hover {
  border-color: var(--wg-green);
}

.post-navigation .meta-nav {
  display: block;
  font-size: 0.875rem;
  color: var(--wg-ink-soft);
}

.post-navigation .post-title {
  font-family: var(--wg-font-serif);
  font-size: 1.125rem;
  font-weight: 700;
}

.comments-area {
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 4vw, 2.75rem);
  background-color: var(--wg-paper);
  border: 1px solid var(--wg-line);
  border-radius: var(--wg-radius);
}

.comments-title,
.comment-reply-title {
  font-size: 1.5rem;
}

.comment-list,
.comment-list .children {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-list .children {
  margin-left: clamp(1rem, 4vw, 2.5rem);
}

.comment-body {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--wg-line);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.6rem;
  font-family: var(--wg-font-sans);
  font-size: 0.9375rem;
  color: var(--wg-ink-soft);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--wg-ink);
}

.comment-author .avatar {
  border-radius: 50%;
}

.comment-author .says {
  display: none;
}

.comment-metadata a,
.reply a {
  color: var(--wg-ink-soft);
  text-decoration: none;
}

.reply {
  margin-top: 0.5rem;
  font-family: var(--wg-font-sans);
  font-size: 0.9375rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--wg-font-sans);
  font-weight: 700;
  font-size: 0.9375rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--wg-ink);
  background-color: var(--wg-paper);
  border: 1px solid var(--wg-field);
  border-radius: var(--wg-radius);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--wg-green);
  box-shadow: 0 0 0 3px rgba(47, 107, 58, 0.18);
}

.comment-form .submit,
input[type="submit"]:not(.screen-reader-text) {
  padding: 0.7rem 1.4rem;
  font-family: var(--wg-font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--wg-forest);
  border: 0;
  border-radius: var(--wg-radius);
  cursor: pointer;
}

.comment-form .submit:hover {
  background-color: var(--wg-green);
}


/* ==========================================================================
   7. Footer
   ========================================================================== */

.site-footer {
  padding: 1.5rem var(--wg-gutter) 2rem;
  font-family: var(--wg-font-sans);
  font-size: 0.9375rem;
  text-align: center;
  color: var(--wg-ink-soft);
}

@media (max-width: 59.99em) {
  .site-footer {
    color: rgba(233, 239, 229, 0.7);
  }
}


/* ==========================================================================
   8. Focus and motion
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--wg-green);
  outline-offset: 2px;
}

#sidebar :focus-visible,
#masthead :focus-visible,
#secondary :focus-visible {
  outline-color: var(--wg-leaf);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}