{
  "settings": {
    "defaults": {
      "text": {
        "font_family": "NotoSans-Regular",
        "font_mode": "prefer",
        "font_size": 10,
        "color": "#111827"
      }
    },
    "metadata": {
      "title": "Flow Document report example"
    }
  },
  "flow_document": {
    "styles": {
      "body_text": {
        "target": "text",
        "properties": {
          "font_size": 10,
          "line_height": 1.4,
          "color": "#1F2937"
        }
      },
      "heading": {
        "target": "text",
        "extends": "body_text",
        "properties": {
          "font_size": 22,
          "font_weight": "bold",
          "color": "#0F172A"
        }
      },
      "callout_frame": {
        "target": "container_frame",
        "properties": {
          "fill": {
            "color": "#EFF6FF"
          },
          "stroke": {
            "color": "#93C5FD",
            "width": 0.4
          },
          "corner_radius": 3,
          "padding": {
            "top": 4,
            "right": 4,
            "bottom": 4,
            "left": 4
          }
        }
      }
    },
    "style_scope": {
      "rules": [
        {
          "selector": {
            "kind": "text",
            "role": "paragraph"
          },
          "style": "body_text"
        }
      ]
    },
    "page_masters": {
      "body": {
        "size": "a4",
        "layout": {
          "page_margin": {
            "top": 18,
            "right": 16,
            "bottom": 18,
            "left": 16
          }
        },
        "footer": {
          "layout": {
            "height": 10
          },
          "elements": [
            {
              "type": "text",
              "layout": {
                "left": 0,
                "top": 2
              },
              "content": "Page {page} of {total_pages}",
              "style": {
                "font_size": 8,
                "color": "#64748B",
                "width": 80
              }
            }
          ]
        }
      },
      "landscape_appendix": {
        "size": "a4",
        "orientation": "landscape",
        "layout": {
          "page_margin": {
            "top": 14,
            "right": 14,
            "bottom": 14,
            "left": 14
          },
          "columns": {
            "count": 2,
            "gap": 8,
            "direction": "left_to_right"
          }
        }
      }
    },
    "segments": [
      {
        "id": "main",
        "page_master": "body",
        "destination": "report_start",
        "content": [
          {
            "type": "block",
            "styles": [
              "heading"
            ],
            "semantics": {
              "role": "heading",
              "heading_level": 1
            },
            "pagination": {
              "keep_with_next": true
            },
            "element": {
              "type": "text",
              "content": "Quarterly report"
            }
          },
          {
            "type": "stack",
            "layout": {
              "axis": "vertical",
              "gap": 4
            },
            "content": [
              {
                "type": "block",
                "semantics": {
                  "role": "paragraph"
                },
                "pagination": {
                  "orphan_lines": 2,
                  "widow_lines": 2
                },
                "element": {
                  "type": "text",
                  "content": "Flow Document keeps content in source order and derives continuation pages from the selected Page Master."
                }
              },
              {
                "type": "block",
                "styles": [
                  "callout_frame"
                ],
                "pagination": {
                  "keep_together": true
                },
                "element": {
                  "type": "container",
                  "width": 178,
                  "elements": [
                    {
                      "type": "text",
                      "content": "This callout is one Flow block while its container owns local child layout."
                    }
                  ],
                  "layout": {
                    "children": {
                      "mode": "linear",
                      "axis": "vertical",
                      "gap": 2,
                      "padding": {
                        "top": 0,
                        "right": 0,
                        "bottom": 0,
                        "left": 0
                      }
                    }
                  }
                }
              }
            ]
          },
          {
            "type": "grid",
            "layout": {
              "columns": [
                {
                  "mode": "fixed",
                  "value": 42
                },
                {
                  "mode": "fraction",
                  "value": 1
                }
              ],
              "column_gap": 6,
              "row_gap": 3,
              "strict_rows": true
            },
            "content": [
              {
                "type": "block",
                "element": {
                  "type": "text",
                  "content": "Status",
                  "style": {
                    "font_weight": "bold"
                  }
                }
              },
              {
                "type": "block",
                "element": {
                  "type": "text",
                  "content": "Ready for review"
                }
              }
            ]
          },
          {
            "type": "placed",
            "layout": {
              "reference": "body",
              "bounds": "error"
            },
            "semantics": {
              "decorative": true
            },
            "element": {
              "type": "text",
              "layout": {
                "left": 142,
                "top": 0
              },
              "content": "DRAFT",
              "style": {
                "font_size": 8,
                "font_weight": "bold",
                "color": "#B91C1C",
                "width": 30,
                "text_align": "right"
              }
            }
          },
          {
            "type": "block",
            "element": {
              "type": "text",
              "content": "Open the landscape appendix",
              "link": {
                "target": {
                  "type": "destination",
                  "destination": "appendix_start"
                },
                "alt": "Go to the landscape appendix"
              }
            }
          }
        ]
      },
      {
        "id": "appendix",
        "page_master": "landscape_appendix",
        "destination": "appendix_start",
        "page_numbering": {
          "mode": "continue"
        },
        "content": [
          {
            "type": "block",
            "styles": [
              "heading"
            ],
            "semantics": {
              "role": "heading",
              "heading_level": 1
            },
            "element": {
              "type": "text",
              "content": "Landscape appendix"
            }
          },
          {
            "type": "block",
            "semantics": {
              "role": "paragraph"
            },
            "element": {
              "type": "text",
              "content": "The Page Master supplies two body columns. Content advances through columns in logical source order before creating a continuation page."
            }
          },
          {
            "type": "break",
            "kind": "column"
          },
          {
            "type": "block",
            "semantics": {
              "role": "paragraph"
            },
            "element": {
              "type": "text",
              "content": "This paragraph starts in the next Page Master column."
            }
          }
        ]
      }
    ]
  }
}
